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

FIX Replace assignment with intended comparison #421

Closed
wants to merge 1 commit into from
Closed

FIX Replace assignment with intended comparison #421

wants to merge 1 commit into from

Conversation

oddnoc
Copy link

@oddnoc oddnoc commented Apr 24, 2024

Expected behaviour

If E_DEPRECATED is defined and $errno is either E_DEPRECATED or E_USER_DEPRECATED, return from handleError().

Actual behaviour

If E_DEPRECATED is defined and $errno is any value, return from handleError(). This means that exceptions are never thrown by the method whenever E_DEPRECATED is defined.

@oddnoc oddnoc changed the title Replace assignment with intended comparison FIX: Replace assignment with intended comparison Apr 24, 2024
@oddnoc oddnoc changed the title FIX: Replace assignment with intended comparison FIX Replace assignment with intended comparison Apr 24, 2024
if ($errno == E_DEPRECATED || $errno = E_USER_DEPRECATED) {
if (E_DEPRECATED == $errno || E_USER_DEPRECATED == $errno) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't use YODA syntax.

@GuySartorelli
Copy link
Collaborator

GuySartorelli commented Apr 25, 2024

Please also retarget this PR to the 5.1 branch so it can be released as a patch.

@oddnoc oddnoc changed the base branch from 4 to 5.1 April 26, 2024 01:25
@oddnoc
Copy link
Author

oddnoc commented Apr 26, 2024

Will open a new PR

@oddnoc oddnoc closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants