#37251 [Asn->Csd]: deadlock when custom error handler is to catch array type hint error

From: Date: Fri, 05 May 2006 08:05:22 +0000
Subject: #37251 [Asn->Csd]: deadlock when custom error handler is to catch array type hint error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96642@lists.php.net to get a copy of this message
ID: 37251 Updated by: dmitry@php.net Reported By: spam01 at pornel dot net -Status: Assigned +Status: Closed Bug Type: Reproducible crash Operating System: any? OS X tested PHP Version: 6CVS-2006-04-30 (snap) Assigned To: dmitry New Comment: Fixed in CVS HEAD. Previous Comments: ------------------------------------------------------------------------ [2006-04-30 17:34:28] spam01 at pornel dot net Description: ------------ If I have custom error handler set and cause error by not giving arguments to function that expects array, PHP deadlocks (endless loop). Without custom error handler same code outputs "Catchable fatal error: Argument 1 passed to ... must be an array, called in ..." Reproduce code: --------------- <?php function error_handler($errno, $errstr, $errfile, $errline, $context) { echo 'OK'; } set_error_handler('error_handler'); class Foo { function foo(array $foo) { } } $foo = new Foo(); $foo->foo(); Expected result: ---------------- 'OK' Actual result: -------------- No output. 100% CPU usage. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37251&edit=1

« previous php.bugs (#96642) next »