Re: Re: hex2bin: E_WARNING is too much for odd string?
| From: | Sherif Ramadan | Date: | Thu, 27 Jun 2013 01:33:44 +0000 |
| Subject: | Re: Re: hex2bin: E_WARNING is too much for odd string? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67916@lists.php.net to get a copy of this message | ||
On Wed, Jun 26, 2013 at 9:05 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> Hi all,
>
> I've sent pull request for PHP-5.5 branch.
> https://github.com/php/php-src/pull/369
>
> It's simple 1 liner removes E_WARNING for invalid length.
>
> Are there any objections?
>
Yes, I object to removing the error in the same breath we're arguing for
consistency. 5.4.0 through 5.4.3 (no error), 5.4.4 through 5.4.16 (error),
5.5.0 (error), 5.5.1 (no error)??? What kind of consistency is this?
I thought you wanted to add an extra error for malformed hex, which I would
have been fine with, but removing the error entirely? The error is useful.
It informs the user that they may have buggy code since the function is
clearly documented to expect even length hex encoded strings.
> If not I'll merge it to PHP-5.5 and master, then update docs.
>
>
>