Skip to content

Commit

Permalink
Fixed strcmp(): Passing null to parameter #1 ($string1) of type strin… (
Browse files Browse the repository at this point in the history
#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>
  • Loading branch information
kiatng and sreichel committed Sep 23, 2024
1 parent 9827b1f commit 4ddd7fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ protected function _validateResetPasswordLinkToken($customerId, $resetPasswordLi
}

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

0 comments on commit 4ddd7fb

Please sign in to comment.