Re: substr with null length
| From: | Colin O'Dell | Date: | Mon, 21 Oct 2019 19:11:07 +0000 |
| Subject: | Re: substr with null length | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107613@lists.php.net to get a copy of this message | ||
On Mon, Oct 21, 2019 at 11:29 AM Nikita Popov <nikita.ppv@gmail.com> wrote:
> This is a fairly common deficiency in the implementation of internal
> functions. Part of the reason is that historically zend_parse_parameters
> did not support the ! modifier for integers, and partly these are just
> implementation oversights.
>
> Feel free to send a PR to fix this for PHP 8, no RFC needed. If you're
> interested in addressing this for more functions, do a grep for "= UNKNOWN"
> on the codebase, which gives you (with a few exceptions) a list of
> functions that currently handle null parameters incorrectly and should
> ideally be fixed for PHP 8.
>
>
Thank you so much for that guidance! I wasn't sure about the RFC as it's
technically a behavioral change, but I agree with you (and Christoph) and
have therefore submitted a pull request with this change:
https://github.com/php/php-src/pull/4840
I'll also take a look at those
other functions and see if I can assist with adjusting those other
instances as well.
Cheers,
Colin O'Dell
colinodell@gmail.com