Skip to content

Conversation

@kiatng
Copy link
Contributor

@kiatng kiatng commented Sep 19, 2024

…g is deprecated

Description (*)

Array
(
    [type] => 8192:E_DEPRECATED
    [message] => strcmp(): Passing null to parameter #1 ($string1) of type string is deprecated
    [file] => .../app/code/core/Mage/Customer/controllers/AccountController.php
    [line] => 935
    [uri] => /customer/account/changeforgotten/
)

@kiatng kiatng added the PHP 8 Related to PHP8 label Sep 19, 2024
@github-actions github-actions bot added the Component: Customer Relates to Mage_Customer label Sep 19, 2024
Copy link
Contributor

@sreichel sreichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works.

Maybe use if (is_null($customerToken || ...) or if (!is_string($customerToken || ...) ?

It would avoid to call strcmp().

sreichel
sreichel previously approved these changes Sep 19, 2024
@sreichel sreichel requested a review from addison74 September 23, 2024 05:49
@sreichel sreichel merged commit 4ddd7fb into OpenMage:main Sep 23, 2024
18 checks passed
@sreichel sreichel deleted the strcmp_null_deprecation branch September 23, 2024 05:52
fballiano added a commit to MahoCommerce/maho that referenced this pull request Sep 23, 2024
@sreichel
Copy link
Contributor

@fballiano thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Customer Relates to Mage_Customer PHP 8 Related to PHP8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants