From: Operating system: FreeBSD 8.0 PHP version: 5.3.3 Package: *Programming Data Structures Bug Type: Bug Bug description:autoload not called inside create_function
Description: ------------ If i define my own error handler with the use of the set_error_handler and the create_function functions, then the 'errors' class inside the create_function triggers the autoload function by errors that user defined error handlers can handle. It's OK! But when i make an E_STRICT error for example by defining the 'connect' function in class 'a' (which already exists in the built in mysqli class), then it won't call the autoload function, it gives me a fatal error for not finding the 'errors' class. What i expected: a) If this type of E_STRICT error cann't be handled by my own error handler, then PHP's default error handler should have been used. b) If this type of E_STRICT error can be handled by my own error handler, then the __autoload function should have been called as a last chance for opening the 'errors' class. Test script: --------------- index.php: <?php set_error_handler(create_function('', 'errors::php_error();')); function __autoload($class_name) { die('autoload called'); } include('mysql.php'); ?> mysql.php: <?php class a extends mysqli { function connect() {} } ?> Expected result: ---------------- autoload called Actual result: -------------- Fatal error: Class 'errors' not found in mysql.php on line 7 -- Edit bug report at http://bugs.php.net/bug.php?id=52762&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52762&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52762&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52762&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52762&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52762&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52762&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52762&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52762&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52762&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52762&r=support Expected behavior: http://bugs.php.net/fix.php?id=52762&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52762&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52762&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52762&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52762&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52762&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52762&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52762&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52762&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52762&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52762&r=mysqlcfg