ID: 21820 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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