Bug #52412 [Com]: __autoload fails to throw exception when calling a static method on the class
Edit report at http://bugs.php.net/bug.php?id=52412edit=1 ID: 52412 Comment by: alex dot offshore at gmail dot com Reported by:madboyka at yahoo dot com Summary:__autoload fails to throw exception when calling a static method on the class Status: Open Type: Bug Package:Scripting Engine problem Operating System: Windows PHP Version:5.3.3 Block user comment: N New Comment: Temporary solution. Caveats and notices: - The class actually WILL BE DEFINED ANYWAY; - 'eval' usage; - __callStatic used to avoid method not found error. ?php function __autoload($className) { echo Want to load $className.\n; // assuming we can not load class // error handling code { eval('class ' . $className . ' { static function __callStatic($n, $a) { return false; } }'); throw new Exception(Unable to load $className.); } } try { //new MissingClass(); // works as expected MissingClass::someFunction(); } catch (Exception $e) { echo 'CAUGHT: ' . $e-getMessage(), \n; } Previous Comments: [2010-09-03 03:26:56] php dot net at phrozenbyte dot de Same on Ubuntu 10.04 / Apache 2.2 and CLI mode Test script: --- ?php spl_autoload_register( function($autoload) { throw new Exception(); } ); try { Foo::bar(); } catch(Exception $e) { echo Exception caught\n; } ? Expected result: Exception caught Actual result: -- Fatal error: Class 'Foo' not found in /home/daniel/www/other/php-bug.php on line 0 [2010-07-23 09:34:02] madboyka at yahoo dot com Description: I've tried to do the following: 1. Wrote and autoload method, that throws an exception. 3. Made a static call on a non-existing class within a try block. Tried this on windows 7 / Apache 2.2 / PHP 5.3.3. Test script: --- ?php function __autoload($class_name) { throw new Exception($class_name); } try { Application::start(); // new Application(); works fine } catch (Exception $ex) { var_dump($ex); } Expected result: The script should var_dump() an exception with the Message 'Application' as it does when instantiating a class. Actual result: -- The script dies with Fatal error: Class 'Application' not found. -- Edit this bug report at http://bugs.php.net/bug.php?id=52412edit=1
#44728 [Bgs]: fnmatch() is undefined
ID: 44728 User updated by: alex dot offshore at gmail dot com Reported By: alex dot offshore at gmail dot com Status: Bogus Bug Type: Feature/Change Request Operating System: Windows Vista PHP Version: 5.2.5 New Comment: Sorry, had not given attention to the documentation notice. Previous Comments: [2008-04-15 00:13:46] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. http://www.php.net/fnmatch For now this function is not available on Windows or other non-POSIX compliant systems. [2008-04-15 00:07:10] alex dot offshore at gmail dot com Description: Fatal error occures when trying to call fnmatch(): the function is undefined. Reproduce code: --- fnmatch('anypattern', 'anystring'); -- Edit this bug report at http://bugs.php.net/?id=44728edit=1
#44728 [NEW]: fnmatch() is undefined
From: alex dot offshore at gmail dot com Operating system: Windows Vista PHP version: 5.2.5 PHP Bug Type: *Directory/Filesystem functions Bug description: fnmatch() is undefined Description: Fatal error occures when trying to call fnmatch(): the function is undefined. Reproduce code: --- fnmatch('anypattern', 'anystring'); -- Edit bug report at http://bugs.php.net/?id=44728edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44728r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44728r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44728r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44728r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44728r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44728r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44728r=needscript Try newer version:http://bugs.php.net/fix.php?id=44728r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44728r=support Expected behavior:http://bugs.php.net/fix.php?id=44728r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44728r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44728r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44728r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44728r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44728r=dst IIS Stability:http://bugs.php.net/fix.php?id=44728r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44728r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44728r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44728r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44728r=mysqlcfg