Re: regression in the new parameter parsing API, 5.3

From: Date: Tue, 06 Jan 2009 20:09:13 +0000
Subject: Re: regression in the new parameter parsing API, 5.3
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-42516@lists.php.net to get a copy of this message
On Tue, Jan 6, 2009 at 9:00 PM, Hannes Magnusson <hannes.magnusson@gmail.com> wrote: > On Tue, Jan 6, 2009 at 18:38, Pierre Joye <pierre.php@gmail.com> wrote: >> hi, >> >> The new parameter parser introduced a regression (testing with >> 5.3-cvs) on how "z!" is processed. Example code: >> >> if (0) { >> $authns = 1; >> $addtl = 1; >> } >> $result = dns_get_record("php.net", DNS_ANY, $authns, $addtl); >> print_r($result); >> var_dump($authns); >> var_dump($addtl); >> >> With 5.2, $authns and $addtl are correctly set (zval ptr is not NULL) >> but 5.3 gives NULL. Sorry to do not try to fix it myself, I sadly lack >> the time to take care of that right now. > > Its not the API that is b0rking things, its the full rewrite of the function. > > z! means C NULL, not a zval IS_NULL, so the if (authns) and if (addtl) > checks will only kick in if the variables were initialized. It is still a regression. The same code worked in 5.2.x but returns nothing in 5.3+. We can argue than no notice (undefined variable) was raised in 5.2 (or 5.3), but it worked and should still work, imo. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#42516) next »