summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2003-08-03 21:06:23 +0000
committerZeev Suraski <zeev@php.net>2003-08-03 21:06:23 +0000
commitef5a79bfed814f041fc774491760965fb18c6c0d (patch)
tree8194e6218ec2bd23c5be932cc10432f283354adb /Zend/zend_API.c
parente3f4147931ebd046e43a21688403467b896cfb84 (diff)
downloadphp-git-ef5a79bfed814f041fc774491760965fb18c6c0d.tar.gz
Ensure functions have a valid access level
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 4c26d87ffe..6ceb971ba0 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1171,6 +1171,9 @@ int zend_register_functions(zend_class_entry *scope, zend_function_entry *functi
internal_function->pass_rest_by_reference = 0;
}
if (ptr->flags) {
+ if (!(ptr->flags & ZEND_ACC_PPP_MASK)) {
+ zend_error(error_type, "Invalid access level for %s() - access must be exactly one of public, protected or private", ptr->fname);
+ }
internal_function->fn_flags = ptr->flags;
} else {
internal_function->fn_flags = ZEND_ACC_PUBLIC;