#47987 [Asn]: Autoload stops working if E_DEPRECATED occurs
ID: 47987
Updated by: colder@php.net
Reported By: acecream1 at hotmail dot com
Status: Assigned
Bug Type: SPL related
Operating System: Windows Server 2003
-PHP Version: 5.3.0RC1
+PHP Version: HEAD
-Assigned To: colder
+Assigned To: dmitry
New Comment:
Your error is triggered at compile-time, which disables autoload (and
spl_autoload at the same time).
Won't be fixed for PHP5.3 as it may cause lots of other problems.
Previous Comments:
------------------------------------------------------------------------
[2009-04-19 22:30:47] colder@php.net
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.
------------------------------------------------------------------------
[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
Thread (6 messages)