]> granicus.if.org Git - php/commitdiff
Default to public
authorZeev Suraski <zeev@php.net>
Sun, 3 Aug 2003 21:04:39 +0000 (21:04 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 3 Aug 2003 21:04:39 +0000 (21:04 +0000)
Zend/zend_API.c

index bca19db0d23cf2dd670de3f29fbf5e915e3d56b3..4c26d87ffec608979533d0e881a17e07b785c808 100644 (file)
@@ -1170,7 +1170,11 @@ int zend_register_functions(zend_class_entry *scope, zend_function_entry *functi
                        internal_function->num_args = 0;
                        internal_function->pass_rest_by_reference = 0;
                }
-               internal_function->fn_flags = ptr->flags;
+               if (ptr->flags) {
+                       internal_function->fn_flags = ptr->flags;
+               } else {
+                       internal_function->fn_flags = ZEND_ACC_PUBLIC;
+               }
                if (!internal_function->handler) {
                        zend_error(error_type, "Null function defined as active function");
                        zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);