php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37138 __autoload tries to load callback'ed self and parent
Submitted: 2006-04-19 21:03 UTC Modified: 2006-04-20 07:34 UTC
From: stronny at celestia dot ru Assigned: tony2001 (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.1.2 OS: Windows 2000 sp4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stronny at celestia dot ru
New email:
PHP Version: OS:

 

 [2006-04-19 21:03 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-20 07:34 UTC] dmitry@php.net
Fixed in CVS PHP_5_1.
It was fixed in HEAD long time ago.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:29 2024 UTC