#37138 [Asn->Csd]: __autoload tries to load callback'ed self and parent

From: Date: Thu, 20 Apr 2006 07:34:14 +0000
Subject: #37138 [Asn->Csd]: __autoload tries to load callback'ed self and parent
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96026@lists.php.net to get a copy of this message
 ID:               37138
 Updated by:       dmitry@php.net
 Reported By:      stronny at celestia dot ru
-Status:           Assigned
+Status:           Closed
 Bug Type:         Class/Object related
 Operating System: Windows 2000 sp4
 PHP Version:      5.1.2
 Assigned To:      tony2001
 New Comment:

Fixed in CVS PHP_5_1.
It was fixed in HEAD long time ago.


Previous Comments:
------------------------------------------------------------------------

[2006-04-19 21:03:18] stronny at celestia dot ru

Description:
------------
Ummm... Sorry if I missed this one as being already submitted.

My __autoload logs the non-existing class calls, so... Maybe you could
do something about it... Why should one load self or parent anyway?

Reproduce code:
---------------
function __autoload ($CN) {var_dump ($CN);}
class st {
	public static function e () {echo ("EHLO\n");}
	public static function e2 () {call_user_func (array ('self', 'e'));}
}
class stch extends st {
	public static function g () {call_user_func (array ('parent', 'e'));}
}
st::e ();
st::e2 ();
stch::g ();

Expected result:
----------------
EHLO
EHLO
EHLO

Actual result:
--------------
EHLO
string(4) "self"
EHLO
string(6) "parent"
EHLO


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37138&edit=1


Thread (3 messages)

« previous php.bugs (#96026) next »