]> granicus.if.org Git - php/commitdiff
/* The compiler is not-reentrant. Make sure we __autoload() only during run-time
authorAndi Gutmans <andi@php.net>
Thu, 25 Mar 2004 11:30:02 +0000 (11:30 +0000)
committerAndi Gutmans <andi@php.net>
Thu, 25 Mar 2004 11:30:02 +0000 (11:30 +0000)
     * (doesn't impact fuctionality of __autoload()
     */

Zend/zend_execute_API.c

index 42bfb46cde698cda531b7c7137a6a17ed99a044f..6ecfe90b78155080d849f1b8790a9aa15b16f0bc 100644 (file)
@@ -903,6 +903,14 @@ 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);