Skip to content

Consistent return and notices for substr type of functions #5476

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

Closed
wants to merge 2 commits into from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Apr 27, 2020

Trying to make those return consistent but I'm not 100% sure @nikic can you have a look.

I've also took the luxury to remove a couple of variations tests which are more or less identical and generate massive diffs which have nul bytes in the output (which are a PITA).

Stubs are not yet update (nor Opcache if relevant).

I hope I also covered all the functions which probably should have the same behaviour.

Extensions which have these sort of functions:

  • ext/standard/string
  • ext/iconv
  • ext/mbstring
  • ext/intl: grapheme functions

@Girgias Girgias force-pushed the normalize-substr-oob-start branch 2 times, most recently from 5c41586 to f7c4856 Compare April 28, 2020 11:54
@Girgias Girgias force-pushed the normalize-substr-oob-start branch from f7c4856 to 7b49892 Compare April 28, 2020 17:04
@Girgias
Copy link
Member Author

Girgias commented Apr 29, 2020

@nikic should I add the notices for the length argument at the same time? And do I need to convert some of the ValueErrors back to notices? (as they were warnings before I don't know what would be the best approach)

@Girgias Girgias force-pushed the normalize-substr-oob-start branch from 69919b5 to ea31d46 Compare May 2, 2020 13:31
@Girgias Girgias force-pushed the normalize-substr-oob-start branch 2 times, most recently from 1aafe97 to 621e084 Compare July 20, 2020 17:01
@Girgias Girgias force-pushed the normalize-substr-oob-start branch from 621e084 to 416f81a Compare September 15, 2020 23:16
@Girgias
Copy link
Member Author

Girgias commented Sep 15, 2020

@kocsismate @nikic I've rebased this but haven't checked the code again as I don't know where to go with this.

@Girgias
Copy link
Member Author

Girgias commented Sep 23, 2020

Closing in favour of #6182

@Girgias Girgias closed this Sep 23, 2020
@Girgias Girgias deleted the normalize-substr-oob-start branch September 23, 2020 09:21
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