Re: Re: hex2bin: E_WARNING is too much for odd string?

From: Date: Sat, 29 Jun 2013 09:25:52 +0000
Subject: Re: Re: hex2bin: E_WARNING is too much for odd string?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-68018@lists.php.net to get a copy of this message
On Sat, Jun 29, 2013 at 3:41 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:

> Hi Sherif,
>
> The problem is that current code 'returns false for invalid hex' while it
> 'returns false and E_WARNING for invalid length'.
>
> We may choose behavior for invalid inputs
>  - return false always
>  - return false and raise E_WARNING always
>

For the record, I'm okay with having E_WARNING in both cases.

Nikita


Thread (21 messages)

« previous php.internals (#68018) next »