]> granicus.if.org Git - php/commitdiff
fix disabled classes
authorAntony Dovgal <tony2001@php.net>
Fri, 4 May 2007 12:17:30 +0000 (12:17 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 4 May 2007 12:17:30 +0000 (12:17 +0000)
Zend/tests/errmsg_021.phpt
Zend/zend_API.c

index 99485ef26e17c3ed363f1a924ddd9820626b4f54..4e62f85111fb42494742ae968876170a06d8b9c1 100644 (file)
@@ -13,4 +13,5 @@ $t = new test;
 echo "Done\n";
 ?>
 --EXPECTF--    
-Fatal error: Class 'stdclass' not found in %s on line %d
+Warning: test() has been disabled for security reasons in %s on line %d
+Done
index df54e3b0fd9fc48f9488787ec775a361f97ad554..6d169e19392940dec411a39518a7f80406592907 100644 (file)
@@ -2528,7 +2528,7 @@ ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_
        if (zend_hash_del(CG(class_table), class_name, class_name_length+1)==FAILURE) {
                return FAILURE;
        }
-       INIT_CLASS_ENTRY(disabled_class, class_name, disabled_class_new);
+       INIT_OVERLOADED_CLASS_ENTRY_EX(disabled_class, class_name, class_name_length, disabled_class_new, NULL, NULL, NULL, NULL, NULL);
        disabled_class.create_object = display_disabled_class;
        disabled_class.name_length = class_name_length;
        zend_register_internal_class(&disabled_class TSRMLS_CC);