Skip to content

Conversation

MaxSem
Copy link
Contributor

@MaxSem MaxSem commented Jul 5, 2020

This change addresses one of two problems: that this function
crashes when passed anything but a reference as a 4th parameter.

Another problem is that it's possible to trick PHP into passing a
non-reference with defined(), but it will be addressed separately.

The solution in this change is applicable to other functions, they
will be upgraded later.

This change addresses one of two problems: that this function
crashes when passed anything but a reference as a 4th parameter.

Another problem is that it's possible to trick PHP into passing a
non-reference with defined(), but it will be addressed separately.

The solution in this change is applicable to other functions, they
will be upgraded later.
Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

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

str_replace declares that the argument is passed by reference, as such it may assume that it always receives a reference. If it does not, then that's a bug in the calling code, not str_replace.

@nikic
Copy link
Member

nikic commented Jul 7, 2020

The underlying issue should be addressed by 971e5c5.

@nikic nikic closed this Jul 7, 2020
@MaxSem MaxSem deleted the bug79783 branch March 6, 2021 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants