From: Dmitry Stogov Date: Wed, 22 Aug 2007 13:19:48 +0000 (+0000) Subject: Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, in the same... X-Git-Tag: php-5.2.4RC3~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1aab36e3f22aa55690e03bc22277dc099c6f01f2;p=php Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, in the same way as "instanceof" operator). --- diff --git a/NEWS b/NEWS index 32c11d31e9..998e9ee3bc 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Aug 2007, PHP 5.2.4 +- Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, + in the same way as "instanceof" operator). (Dmitry) - Fixed bug #41904 (proc_open(): empty env array should cause empty environment to be passed to process). (Jani) diff --git a/Zend/tests/is_a.phpt b/Zend/tests/is_a.phpt index dfc0d59b49..f24a6aadb3 100755 --- a/Zend/tests/is_a.phpt +++ b/Zend/tests/is_a.phpt @@ -47,5 +47,4 @@ bool(false) bool(true) bool(false) AUTOLOAD 'X1' -AUTOLOAD 'X2' bool(false) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 7b036edfff..88b14f4b2e 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -660,7 +660,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) convert_to_string_ex(class_name); - if (zend_lookup_class_ex(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name), (instance_ce != NULL), &ce TSRMLS_CC) == FAILURE) { + if (zend_lookup_class_ex(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name), 0, &ce TSRMLS_CC) == FAILURE) { retval = 0; } else { if (only_subclass) {