-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve strpos and strstr function family implementation #4558
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many unnecessary changes in here -- in most cases it should be sufficient to just drop the check for empty needle and not change anything else.
What's the reason for all the error message changes?
The error message change is because |
Could you please split the changes to the strrpos/strripos error handling / implementation into a separate PR? |
09cdbfe
to
a56a784
Compare
Test failures maybe due to being rebased before 0038db2 |
7019f9c
to
1953a7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a note to UPGRADING with a list of functions that now accept an empty needle.
|
||
Warning: stristr(): Empty needle in %s on line %d | ||
bool(false) | ||
string(11) "Hello World" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can drop this file. These are no longer error conditions, and the result is already checked in stristr.phpt.
Merged in as 6d57848 |
Remove empty needle as failure case, normalise implementations and error messages.
Removed test file for bug 63943 as it was covering if the correct warning message is displayed.
Split non 7-bit ASCII characters test into a separate variation test.