php - 预期 user_string 是一个字符串,在第 1662 行的 C :\xampp. .. 中给出的空值

标签 php wordpress

<分区>

最近我在我的 wordpress 上收到这条警告错误消息:

Warning: hash_equals(): Expected user_string to be a string, null given in C:\xampp3\htdocs\Plurielles\wordpress\wp-includes\pluggable.php on line 1662

Warning: hash_equals(): Expected user_string to be a string, null given in C:\xampp3\htdocs\Plurielles\wordpress\wp-includes\pluggable.php on line 1668

它禁用了我网站上的很多功能(添加图片和更多......) 我一直在 php 文件中查找这两行,它们是:

第 1662 行:

if ( hash_equals( $expected, $nonce ) ) {
    return 1;
}

第 1668 行:

if ( hash_equals( $expected, $nonce ) ) {
    return 2;
}

你知道我该如何解决吗?我是 PHP 的新手,如果这真的很容易解决,我深表歉意(你可以给我扔石头)。

最佳答案

非常感谢我在网站上找到的帮助,我找到了解决方案并将其发布在这里,以供与我处于相同情况的人使用。

你只需使用 settype ($variable ="string") 就我而言: 设置类型($expected ="string") 设置类型($nonce="string") 在应该解决问题的 wordpress 上。

关于php - 预期 user_string 是一个字符串,在第 1662 行的 C :\xampp. .. 中给出的空值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33344738/

相关文章:

php - 从 MySQL 数据库中获取 PHP 中的最小值?

PHP 在关联数组中使用长文本有一些影响吗?

wordpress - 自定义分类法 - 限制父下拉菜单深度

wordpress - 更改购物车小部件 Woocommerce 中的 "View Cart"和 "Checkout"按钮文本

php - 使用连接表中的值连接多个表

php - 如何仅允许特定用户查看 Drupal 中内容类型的特定字段?

PHP - 应用多级 PHP 用户授权的良好做法

php - 使用多个模板显示页面内容 - WordPress

mysql - 错误#1064 : phpMyAdmin import showing html errors in a MYSQL database - why html?

php - 删除 order() 不起作用。 Woocommerce、wordpress