Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c

From: Date: Sun, 03 Aug 2003 21:29:30 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1593@lists.php.net to get a copy of this message
Hello Zeev, the following patch would also allow abstract functions: Index: Zend/zend_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_API.c,v retrieving revision 1.195 diff -u -p -r1.195 zend_API.c --- Zend/zend_API.c 3 Aug 2003 21:06:23 -0000 1.195 +++ Zend/zend_API.c 3 Aug 2003 21:27:49 -0000 @@ -1178,7 +1178,7 @@ int zend_register_functions(zend_class_e } else { internal_function->fn_flags = ZEND_ACC_PUBLIC; } - if (!internal_function->handler) { + if (!internal_function->handler && !(ptr->flags&ZEND_ACC_ABSTRACT)) { zend_error(error_type, "Null function defined as active function"); zend_unregister_functions(functions, count, target_function_table TSRMLS_CC); return FAILURE; ZS> Modified files: ZS> /ZendEngine2 zend_API.c ZS> Log: ZS> Ensure functions have a valid access level ZS> Index: ZendEngine2/zend_API.c ZS> diff -u ZendEngine2/zend_API.c:1.194 ZendEngine2/zend_API.c:1.195 ZS> --- ZendEngine2/zend_API.c:1.194 Sun Aug 3 17:04:39 2003 ZS> +++ ZendEngine2/zend_API.c Sun Aug 3 17:06:23 2003 ZS> @@ -18,7 +18,7 @@ ZS> +----------------------------------------------------------------------+ ZS> */ ZS> -/* $Id: zend_API.c,v 1.194 2003/08/03 21:04:39 zeev Exp $ */ ZS> +/* $Id: zend_API.c,v 1.195 2003/08/03 21:06:23 zeev Exp $ */ ZS> #include "zend.h" ZS> #include "zend_execute.h" ZS> @@ -1171,6 +1171,9 @@ ZS> internal_function->pass_rest_by_reference = 0; ZS> } ZS> if (ptr->flags) { ZS> + if (!(ptr->flags & ZEND_ACC_PPP_MASK)) { ZS> + zend_error(error_type, "Invalid access level for %s() - ZS> access must be exactly one of public, protected or private", ptr->fname); ZS> + } Should you do it pedantic to disallow combinations of the three? Best regards, Marcus mailto:helly@php.net

« previous php.zend-engine.cvs (#1593) next »