On Tue, Jan 6, 2009 at 9:00 PM, Hannes Magnusson
<hannes.magnus...@gmail.com> wrote:
> On Tue, Jan 6, 2009 at 18:38, Pierre Joye <pierre....@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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to