laruence                                 Fri, 03 Feb 2012 16:27:35 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=323045

Log:
Fixed bug #60968 (Late static binding doesn't work with 
ReflectionMethod::invokeArgs())

Bug: https://bugs.php.net/60968 (Assigned) Late static binding doesn't work 
with ReflectionMethod::invokeArgs()
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
    U   php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt
    U   php/php-src/trunk/NEWS
    U   php/php-src/trunk/ext/reflection/php_reflection.c
    U   php/php-src/trunk/ext/reflection/tests/bug60367.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2012-02-03 16:21:08 UTC (rev 323044)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-02-03 16:27:35 UTC (rev 323045)
@@ -36,6 +36,10 @@
 - SOAP:
   . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)

+- Reflection:
+  . Fixed bug #60968 (Late static binding doesn't work with
+    ReflectionMethod::invokeArgs()). (Laruence)
+
 ?? ??? 2012, PHP 5.3.10

 (to be added)

Modified: php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c        
2012-02-03 16:21:08 UTC (rev 323044)
+++ php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c        
2012-02-03 16:27:35 UTC (rev 323045)
@@ -2744,7 +2744,7 @@
        fcc.initialized = 1;
        fcc.function_handler = mptr;
        fcc.calling_scope = obj_ce;
-       fcc.called_scope = obj_ce;
+       fcc.called_scope = intern->ce;
        fcc.object_ptr = object;

        result = zend_call_function(&fci, &fcc TSRMLS_CC);

Modified: php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt     
2012-02-03 16:21:08 UTC (rev 323044)
+++ php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt     
2012-02-03 16:27:35 UTC (rev 323045)
@@ -20,7 +20,9 @@

 $method = new ReflectionMethod("b::call");
 $method->invoke(null);
+$method->invokeArgs(null, array());
 $method = new ReflectionMethod("A::call");
 $method->invoke(null);
+$method->invokeArgs(null, array());
 --EXPECTF--
-BA
+BBAA

Modified: php/php-src/trunk/NEWS
===================================================================
--- php/php-src/trunk/NEWS      2012-02-03 16:21:08 UTC (rev 323044)
+++ php/php-src/trunk/NEWS      2012-02-03 16:27:35 UTC (rev 323045)
@@ -35,4 +35,8 @@
 - pgsql
   . Added pg_escape_literal() and pg_escape_identifier() (Yasuo)

+- Reflection:
+  . Fixed bug #60968 (Late static binding doesn't work with
+    ReflectionMethod::invokeArgs()). (Laruence)
+
 <<< NOTE: Insert NEWS from last stable release here prior to actual release! 
>>>

Modified: php/php-src/trunk/ext/reflection/php_reflection.c
===================================================================
--- php/php-src/trunk/ext/reflection/php_reflection.c   2012-02-03 16:21:08 UTC 
(rev 323044)
+++ php/php-src/trunk/ext/reflection/php_reflection.c   2012-02-03 16:27:35 UTC 
(rev 323045)
@@ -2920,7 +2920,7 @@
        fcc.initialized = 1;
        fcc.function_handler = mptr;
        fcc.calling_scope = obj_ce;
-       fcc.called_scope = obj_ce;
+       fcc.called_scope = intern->ce;
        fcc.object_ptr = object;

        result = zend_call_function(&fci, &fcc TSRMLS_CC);

Modified: php/php-src/trunk/ext/reflection/tests/bug60367.phpt
===================================================================
--- php/php-src/trunk/ext/reflection/tests/bug60367.phpt        2012-02-03 
16:21:08 UTC (rev 323044)
+++ php/php-src/trunk/ext/reflection/tests/bug60367.phpt        2012-02-03 
16:27:35 UTC (rev 323045)
@@ -20,7 +20,9 @@

 $method = new ReflectionMethod("b::call");
 $method->invoke(null);
+$method->invokeArgs(null, array());
 $method = new ReflectionMethod("A::call");
 $method->invoke(null);
+$method->invokeArgs(null, array());
 --EXPECTF--
-BA
+BBAA

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to