php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60968 Late static binding doesn't work with ReflectionMethod::invokeArgs()
Submitted: 2012-02-03 13:18 UTC Modified: 2012-03-02 03:36 UTC
From: rosen at developer dot bg Assigned: laruence (profile)
Status: Closed Package: Reflection related
PHP Version: 5.3.10 OS: CentOS 5.6 (kernel 2.6.18-238.1)
Private report: No CVE-ID: None
 [2012-02-03 13:18 UTC] rosen at developer dot bg
Description:
------------
This bug was fixed in 5.3.9 for ReflectionMethod::invoke() (see bug #60367), but it still exists for ReflectionMethod::invokeArgs()

Test script:
---------------
<?php

class A {
	static public function method() {
		echo get_called_class();
	}
}

class B extends A {}

$b = new ReflectionClass('B');
$b->getMethod('method')->invoke(null); // outputs 'B'
$b->getMethod('method')->invokeArgs(null, array()); // outputs 'A'


Expected result:
----------------
BB

Actual result:
--------------
BA

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-03 16:26 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2012-02-03 16:27 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=323045
Log: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 [2012-02-03 16:27 UTC] laruence@php.net
fixed in 5.3 , trunk, will close this after ci to 5.4
 [2012-02-06 08:12 UTC] rosen at developer dot bg
Thank you! I patched my PHP with your fix - seems to work fine now.
 [2012-03-02 03:36 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=323777
Log: MFH: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 [2012-03-02 03:36 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2012-03-02 03:36 UTC] laruence@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-04-18 09:45 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e8ad8fc6f9a38e873403169beafcfbc9f973933e
Log: MFH: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 [2012-04-18 09:46 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d2ca448f0743b78007b4b40b04051a62b860236e
Log: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 [2012-07-24 23:37 UTC] rasmus@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e8ad8fc6f9a38e873403169beafcfbc9f973933e
Log: MFH: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 [2012-07-24 23:37 UTC] rasmus@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d2ca448f0743b78007b4b40b04051a62b860236e
Log: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 [2013-11-17 09:33 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e8ad8fc6f9a38e873403169beafcfbc9f973933e
Log: MFH: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 [2013-11-17 09:34 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d2ca448f0743b78007b4b40b04051a62b860236e
Log: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC