Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed strcmp(): Passing null to parameter #1 ($string1) of type strin… #4212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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().

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.

2 participants