Re: Re: Bug #14063: unset($array[]) causes apache 1.3.20

From: Date: Sat, 17 Nov 2001 00:17:54 +0000
Subject: Re: Re: Bug #14063: unset($array[]) causes apache 1.3.20
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-70693@lists.php.net to get a copy of this message
Yasuo Ohgaki wrote:
Derick Rethans wrote:
On Thu, 15 Nov 2001, Yasuo Ohgaki wrote:
Hi Derick, May I ask question? I've spent a little more time on this. (When I submit the patch, I spent less than 10 minutes :) When unset($arr[]) is called, get_zval_ptr() returns NULL since znode has IS_UNUSED type.
unset is supposed to work on a variabele. $arr[] is not a variable, so the parser should give a parsing error IMO.
Nice catch. I didn't think about that. $something != valid var :(
I'm glad Zeev has fixed this in parser level. I was assuming PHP/Zend is tolerant for these errors. Look like some more work is needed on this. Try this script. <?php function foo() { echo "foo()"; } $name = "foo"; unset($$name); $bar = 'AAA; $name = "bar"; unset($$name); ?> I think this is critical bug. There are might other faults that is similar to this problem in parser. -- Yasuo Ohgaki

« previous php.dev (#70693) next »