Magento version 1.9.3.6
Full Error:
Fatal error: Call to undefined function hash_equals() in /var/www/vhosts/lassco/htdocs/app/code/core/Mage/Core/Model/Encryption.php on line 103
This occurs when I enter my admin details to login to the magento cms
I've checked my functions.php file and it seems to be patched correctly with the following code at the end of the file.
if (!function_exists('hash_equals')) {
/**
* Compares two strings using the same time whether they're equal or not.
* A difference in length will leak
*
* @param string $known_string
* @param string $user_string
* @return boolean Returns true when the two strings are equal, false otherwise.
*/
function hash_equals($known_string, $user_string)
{
$result = 0;
if (!is_string($known_string)) {
trigger_error("hash_equals(): Expected known_string to be a string", E_USER_WARNING);
return false;
}
if (!is_string($user_string)) {
trigger_error("hash_equals(): Expected user_string to be a string", E_USER_WARNING);
return false;
}
if (strlen($known_string) != strlen($user_string)) {
return false;
}
for ($i = 0; $i < strlen($known_string); $i++) {
$result |= (ord($known_string[$i]) ^ ord($user_string[$i]));
}
return 0 === $result;
}
}
Any help would be appreciated, thank you