Re: fix bug #53432 (Assignment via string index access on an empty string converts to array)
| From: | Andrea Faulds | Date: | Wed, 20 Nov 2013 21:53:17 +0000 |
| Subject: | Re: fix bug #53432 (Assignment via string index access on an empty string converts to array) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70252@lists.php.net to get a copy of this message | ||
On 20/11/13 21:49, Andrea Faulds wrote:
Just my 2 cents, but that definitely looks like a situation that might crop up in real code unintentionally, and it violates the Principle of Least Astonishment IMO. Consider a hypothetical function which returns a modified string. If we've ended up with an empty string being passed into it, then it suddenly returning an Array is not what you expect, and might horribly break code that assumes the result won't be a string.Oh dear Andrea, you should proofread your emails better. s/won't be/will be -- Andrea Faulds http://ajf.me/