Bug #60968 [Com]: Late static binding doesn't work with ReflectionMethod::invokeArgs()
| From: | rosen at developer dot bg | Date: | Mon, 06 Feb 2012 08:12:16 +0000 |
| Subject: | Bug #60968 [Com]: Late static binding doesn't work with ReflectionMethod::invokeArgs() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167202@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60968&edit=1
ID: 60968
Comment by: rosen at developer dot bg
Reported by: rosen at developer dot bg
Summary: Late static binding doesn't work with
ReflectionMethod::invokeArgs()
Status: Assigned
Type: Bug
Package: Reflection related
Operating System: CentOS 5.6 (kernel 2.6.18-238.1)
PHP Version: 5.3.10
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Thank you! I patched my PHP with your fix - seems to work fine now.
Previous Comments:
------------------------------------------------------------------------
[2012-02-03 16:27:58] laruence@php.net
fixed in 5.3 , trunk, will close this after ci to 5.4
------------------------------------------------------------------------
[2012-02-03 16:27:31] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=323045
Log: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs())
------------------------------------------------------------------------
[2012-02-03 13:18:43] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60968&edit=1