|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-06-05 17:39 UTC] cory dot carson at boeing dot com
Description: ------------ When classloading fails when attempting to call a function on the class, when using the result as a parameter to another function call, will crash PHP itself instead of PHP reporting an error. Test script: --------------- <?php \spl_autoload_register(); (new \SplDoublyLinkedList)->push(NonExistantClass::functionCall()); Expected result: ---------------- "Fatal error: Class 'NonExistantClass' not found" Actual result: -------------- APPCRASH PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 15:00:01 2025 UTC |
I can't reproduce it , I got LogicException instead. do you use any other like xdebug ? reeze@MacBookPro ~/O/p/php-src-5.4> ../php-src-5.4/sapi/cli/php a.php Fatal error: Uncaught exception 'LogicException' with message 'Class NonExistantClass could not be loaded' in /Users/reeze/Opensource/php-test/php- src-5.4/a.php:3 Stack trace: #0 /Users/reeze/Opensource/php-test/php-src-5.4/a.php(3): spl_autoload('NonExistantClas...') #1 {main} thrown in /Users/reeze/Opensource/php-test/php-src-5.4/a.php on line 3 reeze@MacBookPro ~/O/p/php-src-5.4> ../php-src-5.4/sapi/cli/php -v PHP 5.4.5-dev (cli) (built: May 23 2012 15:33:54) (DEBUG) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies