Re: Returning NULL when arg parsing fails - was: Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcntl pcntl.c /ext/pcntl/tests pcntl_signal.phpt

From: Date: Wed, 01 Apr 2009 17:57:10 +0000
Subject: Re: Returning NULL when arg parsing fails - was: Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcntl pcntl.c /ext/pcntl/tests pcntl_signal.phpt
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-43582@lists.php.net to get a copy of this message
Hi,
After a quick discussion with Lukas and Antony on IRC, I wrote a small script to detect how many functions/methods are returning false after failing to validate the arguments: you 'll find the result for PHP_5_3 attached. The regex I've used is not perfect, but if you think it's somewhat accurate we might want to decide fixing in PHP 5.3 as there aren't many places that need to be fixed.
I don't mean to stress you on this, it's not too bad if we don't fix it. But I'd just need a suggestion on what to do within the pdo extension as I'm supposed to commit a fix for PDO::query() and PDO::setFetchMode() to make argument validation more strict and those methods are among the ones that return false when argument checks fail. You'll find a patch for the entire 5.3 php-src, in case you want to take a look: http://www.beccati.com/misc/php/zend_parse_params_return_false.diff Cheers -- Matteo Beccati OpenX - http://www.openx.org

« previous php.internals (#43582) next »