#24658 [Opn->Ver]: class hints with array_walk() causing crash

From: Date: Thu, 17 Jul 2003 18:36:29 +0000
Subject: #24658 [Opn->Ver]: class hints with array_walk() causing crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-44200@lists.php.net to get a copy of this message
 ID:               24658
 Updated by:       moriyoshi@php.net
 Reported By:      eric at cosky dot com
-Status:           Open
+Status:           Verified
 Bug Type:         Reproducible crash
 Operating System: Windows XP SP1
 PHP Version:      5.0.0b1 (beta1)
 New Comment:

verified



Previous Comments:
------------------------------------------------------------------------

[2003-07-15 01:09:40] eric at cosky dot com

Description:
------------
The following code crashes my install of PHP from July 13, 2003.
Removing the class hint in BoomWalker eliminates the crash.

Reproduce code:
---------------
class SomeClass {}
class CrashClass {
	function Boom()
	{
		$a = array( 0,1,2 );
		array_walk(&$a, "BoomWalker", &$this);
	}
}
function BoomWalker(SomeClass &$arrayItem, &$key, &$crashObj) {}
$c = new CrashClass;
$c->Boom();


Expected result:
----------------
Nothing.

Actual result:
--------------
System alert for PHP crashing.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24658&edit=1



Thread (4 messages)

« previous php.bugs (#44200) next »