Browse Source

- Reverted fix for bug #51176

experimental/with_scalar_types
Felipe Pena 16 years ago
parent
commit
e3ced0b540
  1. 8
      Zend/tests/bug45180.phpt
  2. 8
      Zend/tests/bug45186.phpt
  3. 6
      Zend/tests/bug51176.phpt
  4. 4
      Zend/tests/call_static_003.phpt
  5. 2
      Zend/tests/call_static_007.phpt
  6. 6
      Zend/zend_object_handlers.c

8
Zend/tests/bug45180.phpt

@ -43,11 +43,11 @@ __call:
string(3) "ABC" string(3) "ABC"
__call: __call:
string(3) "ABC" string(3) "ABC"
__callstatic:
__call:
string(3) "XYZ" string(3) "XYZ"
__callstatic:
__call:
string(3) "WWW" string(3) "WWW"
__callstatic:
__call:
string(3) "ABC" string(3) "ABC"
__callstatic: __callstatic:
string(1) "A" string(1) "A"
@ -58,4 +58,4 @@ string(1) "C"
__callstatic: __callstatic:
string(3) "FOO" string(3) "FOO"
__callstatic: __callstatic:
string(3) "FOO"
string(3) "FOO"

8
Zend/tests/bug45186.phpt

@ -35,17 +35,17 @@ call_user_func('self::y');
?> ?>
--EXPECTF-- --EXPECTF--
__callstatic:
__call:
string(3) "ABC" string(3) "ABC"
__callstatic:
__call:
string(3) "ABC" string(3) "ABC"
__call: __call:
string(3) "xyz" string(3) "xyz"
__callstatic:
__call:
string(3) "www" string(3) "www"
__call: __call:
string(1) "y" string(1) "y"
__callstatic:
__call:
string(1) "y" string(1) "y"
ok ok
__callstatic: __callstatic:

6
Zend/tests/bug51176.phpt

@ -27,6 +27,6 @@ $foo->start();
?> ?>
--EXPECT-- --EXPECT--
static
static
static
instance
instance
instance

4
Zend/tests/call_static_003.phpt

@ -28,9 +28,9 @@ foo::BAZ();
--EXPECT-- --EXPECT--
nonstatic nonstatic
string(6) "fOoBaR" string(6) "fOoBaR"
static
nonstatic
string(6) "foOBAr" string(6) "foOBAr"
static
nonstatic
string(6) "fOOBAr" string(6) "fOOBAr"
static static
string(3) "bAr" string(3) "bAr"

2
Zend/tests/call_static_007.phpt

@ -30,5 +30,5 @@ a::Foo();
--EXPECT-- --EXPECT--
__callstatic: Test __callstatic: Test
__call: Test __call: Test
__callstatic: Bar
__call: Bar
__callstatic: Foo __callstatic: Foo

6
Zend/zend_object_handlers.c

@ -1134,13 +1134,13 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
free_alloca(lc_function_name, use_heap); 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) && EG(This) &&
Z_OBJ_HT_P(EG(This))->get_class_entry && Z_OBJ_HT_P(EG(This))->get_class_entry &&
instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
return zend_get_user_call_function(ce, function_name_strval, function_name_strlen); 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 { } else {
return NULL; return NULL;
} }

Loading…
Cancel
Save