]> granicus.if.org Git - php/commitdiff
Fix check
authorZeev Suraski <zeev@php.net>
Thu, 6 Feb 2003 00:15:02 +0000 (00:15 +0000)
committerZeev Suraski <zeev@php.net>
Thu, 6 Feb 2003 00:15:02 +0000 (00:15 +0000)
Zend/zend_object_handlers.c

index 999db97fdbb3d410c185674ffd4adb2bff6da2a1..00481de28a8a6194698d31565d312c0e2ff227eb 100644 (file)
@@ -578,7 +578,7 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
                /* Ensure that we haven't overridden a private function and end up calling
                 * the overriding public function...
                 */
-               if (fbc->op_array.fn_flags & ZEND_ACC_CHANGED) {
+               if (EG(scope) && fbc->op_array.fn_flags & ZEND_ACC_CHANGED) {
                        zend_function *priv_fbc;
 
                        if (zend_hash_find(&EG(scope)->function_table, method_name, method_len+1, (void **) &priv_fbc)==SUCCESS