From:             
Operating system: Windows
PHP version:      5.3.3
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:__autoload fails to throw exception when calling a static 
method on the class

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 bug report at http://bugs.php.net/bug.php?id=52412&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52412&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52412&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52412&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52412&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52412&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52412&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52412&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52412&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52412&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52412&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52412&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52412&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52412&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52412&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52412&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52412&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52412&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52412&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52412&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52412&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52412&r=mysqlcfg

Reply via email to