Skip to content

Commit 4ddd7fb

Browse files
kiatngsreichel
andauthored
Fixed strcmp(): Passing null to parameter #1 ($string1) of type strin… (#4212)
* Fixed strcmp(): Passing null to parameter #1 ($string1) of type string is deprecated * Update app/code/core/Mage/Customer/controllers/AccountController.php Co-authored-by: Sven Reichel <github-sr@hotmail.com> * Update app/code/core/Mage/Customer/controllers/AccountController.php Fixed typo --------- Co-authored-by: Sven Reichel <github-sr@hotmail.com>
1 parent 9827b1f commit 4ddd7fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/core/Mage/Customer/controllers/AccountController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ protected function _validateResetPasswordLinkToken($customerId, $resetPasswordLi
932932
}
933933

934934
$customerToken = $customer->getRpToken();
935-
if (strcmp($customerToken, $resetPasswordLinkToken) != 0 || $customer->isResetPasswordLinkTokenExpired()) {
935+
if (is_null($customerToken) || strcmp($customerToken, $resetPasswordLinkToken) !== 0 || $customer->isResetPasswordLinkTokenExpired()) {
936936
throw Mage::exception('Mage_Core', $this->_getHelper('customer')->__('Your password reset link has expired.'));
937937
}
938938
}

0 commit comments

Comments
 (0)