Bug #54054 [Nab]: Autoload not called in user-defined error handler function in case of E_STRICT
| From: | tyrael@php.net | Date: | Sun, 29 Sep 2013 07:56:02 +0000 |
| Subject: | Bug #54054 [Nab]: Autoload not called in user-defined error handler function in case of E_STRICT | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181815@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54054&edit=1
ID: 54054
Updated by: tyrael@php.net
Reported by: morpika at vipmail dot hu
Summary: Autoload not called in user-defined error handler
function in case of E_STRICT
Status: Not a bug
Type: Bug
Package: Scripting Engine problem
Operating System: FreeBSD 8.0
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Antony: how is this any different than including a file from the error handler or
calling spl_autoload_call() manually there.
if your 3) is true(which was always the reasoning for this particular behavior),
we shouldn't be allowed to do that as far as I understand.
Previous Comments:
------------------------------------------------------------------------
[2013-09-18 08:13:44] tony2001@php.net
Related To: Bug #42098
------------------------------------------------------------------------
[2013-09-18 07:56:47] tony2001@php.net
Related To: Bug #60149
------------------------------------------------------------------------
[2013-09-18 07:55:55] tony2001@php.net
Here's how it looks:
1) PHP tries to compile a file
2) an error is found and the error handler is triggered (but we're still in compilation
phase)
3) since we're already in compiler, we can't call the compiler again - the compiler is
not reentrant, so autoload is skipped.
4) class not found.
This behaviour is by design and isn't going to change without complete rewrite of
the compiler (if ever).
------------------------------------------------------------------------
[2013-08-22 09:07:24] ota dot mares at gmail dot com
I have the same issue with a more complex setup using monolog, the custom
monolog
error handler and gelf as logger.
Instead of logging the message "Warning: The use statement with non-compound
name
'UnexpectedValueException' has no effect in ...IndexController.php on line 11"
the
php error handling hickups, resulting in following error: "Fatal error: Class
'Gelf\Message' not found in ...IndexController.php on line 11". Please note that
the above warning is never shown or logged in this case. All you get is a
confusing fatal message.
In all other scenarios the logging works, which leads to the assumption that the
autoloading never happens in the given case.
------------------------------------------------------------------------
[2012-12-27 09:41:18] nicolas dot grekas+php at gmail dot com
This bug is a duplicate of bug #42098.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=54054
--
Edit this bug report at https://bugs.php.net/bug.php?id=54054&edit=1