#47987 [Opn]: Autoload stops working if E_DEPRECATED occurs

From: Date: Sun, 19 Apr 2009 22:30:48 +0000
Subject: #47987 [Opn]: Autoload stops working if E_DEPRECATED occurs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135987@lists.php.net to get a copy of this message
ID: 47987 Updated by: colder@php.net Reported By: acecream1 at hotmail dot com Status: Open Bug Type: SPL related Operating System: Windows Server 2003 PHP Version: 5.3.0RC1 -Assigned To: +Assigned To: colder New Comment: I believe this is due to the fact that this specific error is triggered at compile time, not that it's a E_DEPRECATED. I'll check it out. Previous Comments: ------------------------------------------------------------------------ [2009-04-16 13:22:07] acecream1 at hotmail dot com Description: ------------ I use my custom error_handler and when it is called i throw my custom exception which is being autoloaded using spl_autoload_register when first error occours. This works normaly if Notice or Warning occours (did not test all the error types) but in case of E_DEPRECATED error the autoload is not called and i this reflects in a fatal error becouse my exception class does not exist. Reproduce code: --------------- 1. spl_autoload_register(array($class, $method)); 2. set_error_handler(array($this, 'handleError')); 3. Params\Store\Get::getInstance(&$_GET); //Call-time pass-by-reference has been deprecated D:\www\lib\framework\Framework\Params.php on line 25 Expected result: ---------------- When E_DEPRECATED error would occour i would expect that all registered autoloaders would still function inside the error handler. Actual result: -------------- Fatal error: Class 'Framework\Error\Handler\Exception' not found in D:\www\lib\framework\Framework\Params.php on line 25 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47987&edit=1

« previous php.bugs (#135987) next »