From: f dot engelhardt at 21torr dot com Operating system: Linux PHP version: 5.1.2 PHP Bug Type: Variables related Bug description: Can not parse NULL as reference
Description: ------------ In C and most other programming languages it is possible to parse NULL as a reference parameter to a function (a NULL-Pointer). In PHP i need to allocate a variable, that can be given to the function. So there is no way to parse a NULL-Pointer. Reproduce code: --------------- <?php function bTest(&$paData) { if (is_null($paData)) { // cleanup return true; } // handle data return true; } bTest(NULL); ?> Expected result: ---------------- Should work Actual result: -------------- Fatal error: Cannot pass parameter 1 by reference in ... -- Edit bug report at http://bugs.php.net/?id=36029&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36029&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36029&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36029&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36029&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36029&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36029&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36029&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36029&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36029&r=support Expected behavior: http://bugs.php.net/fix.php?id=36029&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36029&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36029&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36029&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36029&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36029&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36029&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36029&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36029&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36029&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36029&r=mysqlcfg