#21820 [Com]: bc break in parser

2003-01-22 Thread george
 ID:  21820
 Comment by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Open
 Bug Type:Scripting Engine problem
 PHP Version: 4.3.0
 New Comment:

this patch fixes that feature request/bug as well


Previous Comments:


[2003-01-22 13:43:05] [EMAIL PROTECTED]

Allowing it would be nice but this topic has come up many times.  Not
sure why it's not been implemented though, maybe there are reasons?  I
forget them.

One feature request for this:
http://bugs.php.net/bug.php?id=15677




[2003-01-22 13:25:11] [EMAIL PROTECTED]

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)



[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




#21820 [Com]: bc break in parser

2003-01-22 Thread george
 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