ID: 39003 Updated by: [EMAIL PROTECTED] Reported By: christoph at ziegenberg dot de Status: Closed Bug Type: Scripting Engine problem Operating System: WinXP SP2 PHP Version: 5.1.6 New Comment:
For what it worth, the expected behavior is *not* to try autoloading when checking if existing variable belongs to non-existing class, because it is obvious that existing object can not belong to non-existing class. I checked with 5.2.4, it works correctly. Previous Comments: ------------------------------------------------------------------------ [2006-10-02 11:07:38] [EMAIL PROTECTED] This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. ------------------------------------------------------------------------ [2006-10-02 10:42:37] [EMAIL PROTECTED] It's just a doc problem Tony... he's doing an instance of with an unknown class. That gives an error message before the instance of runs and can show it's error message. ------------------------------------------------------------------------ [2006-10-02 09:39:28] [EMAIL PROTECTED] Not a bug here, this is expected so marking as doc problem. ------------------------------------------------------------------------ [2006-10-01 06:51:19] christoph at ziegenberg dot de My version of the manual says this (from the example code): // Fatal Error: Argument 1 must be an instance of OtherClass $foo = new stdClass; $myclass->test($foo); So I should get the error "Fatal error: Argument 1 passed to test() must be an instance of OtherClassName, called in [...]", but I get the error "Fatal error: Class 'OtherClassName' not found in [...]". Of course these are both fatal errors, but the one hand I expect another behaviour for the autoloader function as described and on the other hand the "correct" error message would help to debug the code, because the current error only refers to the __autoloader() function (so you have to use debug_backtrace()/debug_print_backtrace()). ------------------------------------------------------------------------ [2006-10-01 06:07:57] judas dot iscariote at gmail dot com if this is the expected behaviuor ( at least, not the behaviuor I expect ;) ) it is not mentioned in the manual, so either the manual or the engine needs to be corrected ;-) ------------------------------------------------------------------------ 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 http://bugs.php.net/39003 -- Edit this bug report at http://bugs.php.net/?id=39003&edit=1