Recently I’ve had this warning error message on my wordpress:
Warning: hash_equals(): Expected user_string to be a string, null given in C:xampp3htdocsPlurielleswordpresswp-includespluggable.php on line 1662
Warning: hash_equals(): Expected user_string to be a string, null given in C:xampp3htdocsPlurielleswordpresswp-includespluggable.php on line 1668
It disabled a lot of features on my website (add an image and a lot more….)
I’ve been looking in the php file for these two lines, and they are:
line 1662 :
if ( hash_equals( $expected, $nonce ) ) {
return 1;
}
line 1668 :
if ( hash_equals( $expected, $nonce ) ) {
return 2;
}
Do you know how I could fix it? I’m a newbie in PHP so I apologize if this is really easy to solve (you could throw me rock).
Thanks a lot for the help I found on the website, I’ve found a solution and I post it here for people who would be in same situation than me.
You juste have to use a
settype ($variable ="string")
in my case :
settype ($expected ="string")
settype ($nonce="string")
On wordpress that should resolve the problem.