PHP 4.0 Bug #6606 Updated: Crash when returning NULL as a reference value

From: Date: Fri, 09 Mar 2001 01:17:30 +0000
Subject: PHP 4.0 Bug #6606 Updated: Crash when returning NULL as a reference value
Groups: php.dev 
Request: Send a blank email to php-dev+get-48347@lists.php.net to get a copy of this message
ID: 6606 Updated by: sniper Reported By: gildas@stip.fr Old-Status: Feedback Status: Closed Bug Type: Reproduceable crash Assigned To: Comments: No feedback. Doesn't crash for me with the latest CVS. --Jani Previous Comments: --------------------------------------------------------------------------- [2001-01-07 18:42:14] sniper@php.net Does this happen with PHP 4.0.4 ?? --Jani --------------------------------------------------------------------------- [2000-09-07 12:27:50] gildas@stip.fr This crashes: function &foo() { while (list($key, $name) = each($arr)); return($ret); } ------ This works: function &foo() { if (is_array($arr)) while (list($key, $name) = each($arr)); return($ret); } ------ This works: function &foo() { while (list($key, $name) = each($arr)); return(is_array($ret) ? $ret : false); } I know returning a NULL value as refernce is nonsense but it shouldn't crash, right? --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=6606&edit=2

« previous php.dev (#48347) next »