On Thu, 2011-06-02 at 15:29 +0200, Pierre Joye wrote:
> hi,
> 
> I like this for the current stable branch, no bc impact and gives a
> way to detect such mistakes (not ideal but better than nothing).

This has an BC impact. some stupid error handler might be triggered
which might break an application.

The question there is whether that's relevant. I can hardly make up a
situation which makes "sense" and where this additional error will be
triggered. With fantasy the case I find is something like debug code
where "Array" is enough to "verify" the result .. but for such code the
new error shouldn't be tooo bad.

So for 5.3 a notice might be fine.

For newer versions I'd think about consistency, object to scalar gives
E_RECOVERABLE, so might array to scalar.

johannes

> Cheers,
> 
> On Thu, Jun 2, 2011 at 12:11 PM, Patrick ALLAERT <patrickalla...@php.net> 
> wrote:
> > Hi,
> >
> > 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.
> >
> > Patch implementing that behavior change: https://gist.github.com/1004203
> > Patch to adapt the tests: https://gist.github.com/1004204
> >
> > Cheers,
> > Patrick
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> 
> -- 
> Pierre
> 
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
> 



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to