Re: Re: [PATCH] Notice on array to string convertion
| From: | Ferenc Kovacs | Date: | Mon, 06 Jun 2011 14:23:20 +0000 |
| Subject: | Re: Re: [PATCH] Notice on array to string convertion | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53025@lists.php.net to get a copy of this message | ||
On Mon, Jun 6, 2011 at 3:36 PM, Matthew Weier O'Phinney <
weierophinney@php.net> wrote:
> On 2011-06-02, Patrick ALLAERT <patrickallaert@php.net> wrote:
> > I would like to introduce an E_NOTICE when an array is silently
> > converted to a string.
> > This isn't very useful as it constantly produces the following string:
> > "Array" and in most of the case, this is a sign of an error.
> >
> > Let me know about your feelings.
>
> +1 (for E_NOTICE)
>
> This allows warning folks easily during development of potential issues,
> and for those of us using tools like PHPUnit, we'll catch the problem
> early. At the same time, it doesn't break existing code.
>
>
I'm curious, why do you think that E_WARNING would break existing code?
the only think that I can come up with, that some people runs with
display_errors = On, and they doesn't mask E_WARNINGs with error_reporting.
I think that this would be more reason to use E_WARNING there, else those
people won't get noticed about this problem.
Tyrael