]> granicus.if.org Git - php/commitdiff
fix of fix related to __autoload. (ext/standard/tests/network/bug20134.phpt passes...
authorDmitry Stogov <dmitry@php.net>
Sun, 28 Mar 2004 09:37:30 +0000 (09:37 +0000)
committerDmitry Stogov <dmitry@php.net>
Sun, 28 Mar 2004 09:37:30 +0000 (09:37 +0000)
Zend/zend_execute_API.c

index 6ecfe90b78155080d849f1b8790a9aa15b16f0bc..7db680089b17f794098638212399ce897dd8c943 100644 (file)
@@ -893,6 +893,14 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
                return SUCCESS;
        }
 
+       /* The compiler is not-reentrant. Make sure we __autoload() only during run-time
+        * (doesn't impact fuctionality of __autoload()
+       */
+       if (zend_is_compiling(TSRMLS_C)) {
+               free_alloca(lc_name);
+               return FAILURE;
+       }
+
        if (EG(in_autoload) == NULL) {
                ALLOC_HASHTABLE(EG(in_autoload));
                zend_hash_init(EG(in_autoload), 0, NULL, NULL, 0);      
@@ -903,14 +911,6 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
                return FAILURE;
        }
 
-       /* The compiler is not-reentrant. Make sure we __autoload() only during run-time
-        * (doesn't impact fuctionality of __autoload()
-        */
-       if (zend_is_compiling(TSRMLS_C)) {
-               free_alloca(lc_name);
-               return FAILURE;
-       }
-
        ZVAL_STRINGL(&autoload_function, "__autoload", sizeof("__autoload")-1,  0);
 
        INIT_PZVAL(class_name_ptr);