#21820 [Com]: bc break in parser
| From: | george at omniti dot com | Date: | Wed, 22 Jan 2003 19:25:12 +0000 |
| Subject: | #21820 [Com]: bc break in parser | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-30941@lists.php.net to get a copy of this message | ||
ID: 21820
Comment by: george@omniti.com
Reported By: george@omniti.com
Status: Open
Bug Type: Scripting Engine problem
PHP Version: 4.3.0
New Comment:
patch up at http://www2.omniti.com/~george/
zend.patch.2002012101
patch allows for "$arr['foo']" to be parsed correctly (this
seems better than disallowing it)
Previous Comments:
------------------------------------------------------------------------
[2003-01-22 09:19:20] george@omniti.com
I don't think this is a bug, but someone sent it to me via
email, so I'm proxy-submitting:
Hello George-
I stumbled upon a serious bug in the string parser and it
goes something like this:
$arr = array('foo' => 'bar');
print "$arr['foo']";
This used to provide a parse error but now instead we get
this one of level E_NOTICE:
Notice: Undefined index: 'foo' in /tmp/a.php on line 4
/tmp/a.php(4) : Notice - Undefined index: 'foo'
This is a serious problem as it moved an error from
parse to E_NOTICE, fails silently as most have error
reporting turned down, shows a misleading error as foo
is defined, and breaks BC.
Tested latest 4_3 HEAD (4.3.1-dev). I would try php5
but I get segfault when trying to compile/use it :)
Have a nice day,
Philip Olson
cc: derick
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21820&edit=1