]> granicus.if.org Git - php/commitdiff
Fix fn_flags handling
authorMarcus Boerger <helly@php.net>
Sun, 24 Aug 2003 11:07:30 +0000 (11:07 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 24 Aug 2003 11:07:30 +0000 (11:07 +0000)
Zend/zend_API.c

index 50a2ad1de9c3e91af5175a7821098ba937aa880a..3451f0ff5a81dbf812ff6bca2f944fff9a45c756 100644 (file)
@@ -1184,8 +1184,10 @@ int zend_register_functions(zend_class_entry *scope, zend_function_entry *functi
                if (ptr->flags) {
                        if (!(ptr->flags & ZEND_ACC_PPP_MASK)) {
                                zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
+                               internal_function->fn_flags |= ZEND_ACC_PUBLIC;
+                       } else {
+                               internal_function->fn_flags = ptr->flags;
                        }
-                       internal_function->fn_flags = ptr->flags;
                } else {
                        internal_function->fn_flags = ZEND_ACC_PUBLIC;
                }