summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-11-03 01:35:26 +0000
committerFelipe Pena <felipe@php.net>2010-11-03 01:35:26 +0000
commit815d0e549b20027e75b6fb678d4026a0b2e7c36b (patch)
tree9caa7631fcbb5fed60f81da575d6b23cab9dd2ef
parent7b4cbadfce17213eee0500eef9e50aefac3f4a92 (diff)
downloadphp-git-815d0e549b20027e75b6fb678d4026a0b2e7c36b.tar.gz
- Reverted fix for bug #51176
-rw-r--r--Zend/tests/bug45180.phpt8
-rw-r--r--Zend/tests/bug45186.phpt8
-rw-r--r--Zend/tests/bug51176.phpt6
-rw-r--r--Zend/tests/call_static_003.phpt4
-rw-r--r--Zend/tests/call_static_007.phpt2
-rw-r--r--Zend/zend_object_handlers.c6
6 files changed, 17 insertions, 17 deletions
diff --git a/Zend/tests/bug45180.phpt b/Zend/tests/bug45180.phpt
index 4e1ab9ee08..f1ca434272 100644
--- a/Zend/tests/bug45180.phpt
+++ b/Zend/tests/bug45180.phpt
@@ -43,11 +43,11 @@ __call:
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 @@ string(1) "C"
__callstatic:
string(3) "FOO"
__callstatic:
-string(3) "FOO"
+string(3) "FOO" \ No newline at end of file
diff --git a/Zend/tests/bug45186.phpt b/Zend/tests/bug45186.phpt
index da7ac73f5c..bcf88a1897 100644
--- a/Zend/tests/bug45186.phpt
+++ b/Zend/tests/bug45186.phpt
@@ -35,17 +35,17 @@ call_user_func('self::y');
?>
--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:
diff --git a/Zend/tests/bug51176.phpt b/Zend/tests/bug51176.phpt
index 436378eff2..1b0e285c64 100644
--- a/Zend/tests/bug51176.phpt
+++ b/Zend/tests/bug51176.phpt
@@ -27,6 +27,6 @@ $foo->start();
?>
--EXPECT--
-static
-static
-static
+instance
+instance
+instance \ No newline at end of file
diff --git a/Zend/tests/call_static_003.phpt b/Zend/tests/call_static_003.phpt
index d5e2b75298..566ff0fdf2 100644
--- a/Zend/tests/call_static_003.phpt
+++ b/Zend/tests/call_static_003.phpt
@@ -28,9 +28,9 @@ foo::BAZ();
--EXPECT--
nonstatic
string(6) "fOoBaR"
-static
+nonstatic
string(6) "foOBAr"
-static
+nonstatic
string(6) "fOOBAr"
static
string(3) "bAr"
diff --git a/Zend/tests/call_static_007.phpt b/Zend/tests/call_static_007.phpt
index 766802092b..419f102310 100644
--- a/Zend/tests/call_static_007.phpt
+++ b/Zend/tests/call_static_007.phpt
@@ -30,5 +30,5 @@ a::Foo();
--EXPECT--
__callstatic: Test
__call: Test
-__callstatic: Bar
+__call: Bar
__callstatic: Foo
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 291655027f..026f15dad8 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -984,13 +984,13 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
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;
}