felipe                                   Wed, 03 Nov 2010 01:35:26 +0000

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

Log:
- Reverted fix for bug #51176

Bug: http://bugs.php.net/51176 (Closed) Static calling in non-static method 
behaves like $this->
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/Zend/tests/bug45180.phpt
    U   php/php-src/branches/PHP_5_3/Zend/tests/bug45186.phpt
    U   php/php-src/branches/PHP_5_3/Zend/tests/bug51176.phpt
    U   php/php-src/branches/PHP_5_3/Zend/tests/call_static_003.phpt
    U   php/php-src/branches/PHP_5_3/Zend/tests/call_static_007.phpt
    U   php/php-src/branches/PHP_5_3/Zend/zend_object_handlers.c
    U   php/php-src/trunk/Zend/tests/bug45180.phpt
    U   php/php-src/trunk/Zend/tests/bug45186.phpt
    U   php/php-src/trunk/Zend/tests/bug51176.phpt
    U   php/php-src/trunk/Zend/tests/call_static_003.phpt
    U   php/php-src/trunk/Zend/tests/call_static_007.phpt
    U   php/php-src/trunk/Zend/zend_object_handlers.c

Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug45180.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/tests/bug45180.phpt       2010-11-03 
00:46:28 UTC (rev 305042)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug45180.phpt       2010-11-03 
01:35:26 UTC (rev 305043)
@@ -43,11 +43,11 @@
 string(3) "ABC"
 __call:
 string(3) "ABC"
-__callstatic:
+__call:
 string(3) "XYZ"
-__callstatic:
+__call:
 string(3) "WWW"
-__callstatic:
+__call:
 string(3) "ABC"
 __callstatic:
 string(1) "A"
@@ -58,4 +58,4 @@
 __callstatic:
 string(3) "FOO"
 __callstatic:
-string(3) "FOO"
+string(3) "FOO"
\ No newline at end of file

Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug45186.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/tests/bug45186.phpt       2010-11-03 
00:46:28 UTC (rev 305042)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug45186.phpt       2010-11-03 
01:35:26 UTC (rev 305043)
@@ -35,17 +35,17 @@

 ?>
 --EXPECTF--
-__callstatic:
+__call:
 string(3) "ABC"
-__callstatic:
+__call:
 string(3) "ABC"
 __call:
 string(3) "xyz"
-__callstatic:
+__call:
 string(3) "www"
 __call:
 string(1) "y"
-__callstatic:
+__call:
 string(1) "y"
 ok
 __callstatic:

Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug51176.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/tests/bug51176.phpt       2010-11-03 
00:46:28 UTC (rev 305042)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug51176.phpt       2010-11-03 
01:35:26 UTC (rev 305043)
@@ -27,6 +27,6 @@

 ?>
 --EXPECT--
-static
-static
-static
+instance
+instance
+instance
\ No newline at end of file

Modified: php/php-src/branches/PHP_5_3/Zend/tests/call_static_003.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/tests/call_static_003.phpt        
2010-11-03 00:46:28 UTC (rev 305042)
+++ php/php-src/branches/PHP_5_3/Zend/tests/call_static_003.phpt        
2010-11-03 01:35:26 UTC (rev 305043)
@@ -28,9 +28,9 @@
 --EXPECT--
 nonstatic
 string(6) "fOoBaR"
-static
+nonstatic
 string(6) "foOBAr"
-static
+nonstatic
 string(6) "fOOBAr"
 static
 string(3) "bAr"

Modified: php/php-src/branches/PHP_5_3/Zend/tests/call_static_007.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/tests/call_static_007.phpt        
2010-11-03 00:46:28 UTC (rev 305042)
+++ php/php-src/branches/PHP_5_3/Zend/tests/call_static_007.phpt        
2010-11-03 01:35:26 UTC (rev 305043)
@@ -30,5 +30,5 @@
 --EXPECT--
 __callstatic: Test
 __call: Test
-__callstatic: Bar
+__call: Bar
 __callstatic: Foo

Modified: php/php-src/branches/PHP_5_3/Zend/zend_object_handlers.c
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/zend_object_handlers.c    2010-11-03 
00:46:28 UTC (rev 305042)
+++ php/php-src/branches/PHP_5_3/Zend/zend_object_handlers.c    2010-11-03 
01:35:26 UTC (rev 305043)
@@ -984,13 +984,13 @@
        if (!fbc && zend_hash_find(&ce->function_table, lc_function_name, 
function_name_strlen+1, (void **) &fbc)==FAILURE) {
                efree(lc_function_name);

-               if (ce->__callstatic) {
-                       return zend_get_user_callstatic_function(ce, 
function_name_strval, function_name_strlen);
-               } else if (ce->__call &&
+               if (ce->__call &&
                    EG(This) &&
                    Z_OBJ_HT_P(EG(This))->get_class_entry &&
                    instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
                        return zend_get_user_call_function(ce, 
function_name_strval, function_name_strlen);
+               } else if (ce->__callstatic) {
+                       return zend_get_user_callstatic_function(ce, 
function_name_strval, function_name_strlen);
                } else {
                        return NULL;
                }

Modified: php/php-src/trunk/Zend/tests/bug45180.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/bug45180.phpt  2010-11-03 00:46:28 UTC (rev 
305042)
+++ php/php-src/trunk/Zend/tests/bug45180.phpt  2010-11-03 01:35:26 UTC (rev 
305043)
@@ -43,11 +43,11 @@
 string(3) "ABC"
 __call:
 string(3) "ABC"
-__callstatic:
+__call:
 string(3) "XYZ"
-__callstatic:
+__call:
 string(3) "WWW"
-__callstatic:
+__call:
 string(3) "ABC"
 __callstatic:
 string(1) "A"
@@ -58,4 +58,4 @@
 __callstatic:
 string(3) "FOO"
 __callstatic:
-string(3) "FOO"
+string(3) "FOO"
\ No newline at end of file

Modified: php/php-src/trunk/Zend/tests/bug45186.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/bug45186.phpt  2010-11-03 00:46:28 UTC (rev 
305042)
+++ php/php-src/trunk/Zend/tests/bug45186.phpt  2010-11-03 01:35:26 UTC (rev 
305043)
@@ -35,17 +35,17 @@

 ?>
 --EXPECTF--
-__callstatic:
+__call:
 string(3) "ABC"
-__callstatic:
+__call:
 string(3) "ABC"
 __call:
 string(3) "xyz"
-__callstatic:
+__call:
 string(3) "www"
 __call:
 string(1) "y"
-__callstatic:
+__call:
 string(1) "y"
 ok
 __callstatic:

Modified: php/php-src/trunk/Zend/tests/bug51176.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/bug51176.phpt  2010-11-03 00:46:28 UTC (rev 
305042)
+++ php/php-src/trunk/Zend/tests/bug51176.phpt  2010-11-03 01:35:26 UTC (rev 
305043)
@@ -27,6 +27,6 @@

 ?>
 --EXPECT--
-static
-static
-static
+instance
+instance
+instance
\ No newline at end of file

Modified: php/php-src/trunk/Zend/tests/call_static_003.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/call_static_003.phpt   2010-11-03 00:46:28 UTC 
(rev 305042)
+++ php/php-src/trunk/Zend/tests/call_static_003.phpt   2010-11-03 01:35:26 UTC 
(rev 305043)
@@ -28,9 +28,9 @@
 --EXPECT--
 nonstatic
 string(6) "fOoBaR"
-static
+nonstatic
 string(6) "foOBAr"
-static
+nonstatic
 string(6) "fOOBAr"
 static
 string(3) "bAr"

Modified: php/php-src/trunk/Zend/tests/call_static_007.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/call_static_007.phpt   2010-11-03 00:46:28 UTC 
(rev 305042)
+++ php/php-src/trunk/Zend/tests/call_static_007.phpt   2010-11-03 01:35:26 UTC 
(rev 305043)
@@ -30,5 +30,5 @@
 --EXPECT--
 __callstatic: Test
 __call: Test
-__callstatic: Bar
+__call: Bar
 __callstatic: Foo

Modified: php/php-src/trunk/Zend/zend_object_handlers.c
===================================================================
--- php/php-src/trunk/Zend/zend_object_handlers.c       2010-11-03 00:46:28 UTC 
(rev 305042)
+++ php/php-src/trunk/Zend/zend_object_handlers.c       2010-11-03 01:35:26 UTC 
(rev 305043)
@@ -1134,13 +1134,13 @@
                        free_alloca(lc_function_name, use_heap);
                }

-               if (ce->__callstatic) {
-                       return zend_get_user_callstatic_function(ce, 
function_name_strval, function_name_strlen);
-               } else if (ce->__call &&
+               if (ce->__call &&
                    EG(This) &&
                    Z_OBJ_HT_P(EG(This))->get_class_entry &&
                    instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
                        return zend_get_user_call_function(ce, 
function_name_strval, function_name_strlen);
+               } else if (ce->__callstatic) {
+                       return zend_get_user_callstatic_function(ce, 
function_name_strval, function_name_strlen);
                } else {
                        return NULL;
                }

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

Reply via email to