]> granicus.if.org Git - php/commitdiff
move the check down a little so it catches all cases
authorSterling Hughes <sterling@php.net>
Mon, 30 Jun 2003 19:52:47 +0000 (19:52 +0000)
committerSterling Hughes <sterling@php.net>
Mon, 30 Jun 2003 19:52:47 +0000 (19:52 +0000)
Zend/zend_builtin_functions.c

index ba532610772d9e517b0cf03d82e0b3805ea0b4b5..e2fb5dd00197c5aa11ff7780873db531687a57de 100644 (file)
@@ -616,13 +616,14 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
        } else {
                if (only_subclass) {
                        instance_ce = Z_OBJCE_PP(obj)->parent;
-                       if (!instance_ce) {
-                               RETURN_FALSE;
-                       }
                } else {
                        instance_ce = Z_OBJCE_PP(obj);
                }
 
+               if (!instance_ce) {
+                       RETURN_FALSE;
+               }
+
                if (instanceof_function(instance_ce, *ce TSRMLS_CC)) {
                        retval = 1;
                } else {