cvs: ZendEngine2(PHP_5_0) / zend_compile.c
| From: | Stanislav Malyshev | Date: | Thu, 09 Jun 2005 17:04:31 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_0) / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3783@lists.php.net to get a copy of this message | ||
stas Thu Jun 9 13:04:31 2005 EDT
Modified files: (Branch: PHP_5_0)
/ZendEngine2 zend_compile.c
Log:
Disallow abstract privae methods
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.567.2.24&r2=1.567.2.25&ty=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.567.2.24 ZendEngine2/zend_compile.c:1.567.2.25
--- ZendEngine2/zend_compile.c:1.567.2.24 Thu Jun 9 12:59:55 2005
+++ ZendEngine2/zend_compile.c Thu Jun 9 13:04:30 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.567.2.24 2005/06/09 16:59:55 stas Exp $ */
+/* $Id: zend_compile.c,v 1.567.2.25 2005/06/09 17:04:30 stas Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -418,6 +418,9 @@
}
if (modifiers->u.constant.value.lval & ZEND_ACC_ABSTRACT) {
+ if(modifiers->u.constant.value.lval & ZEND_ACC_PRIVATE) {
+ zend_error(E_COMPILE_ERROR, "%s function %s::%s() cannot be declared private",
method_type, CG(active_class_entry)->name, function_name->u.constant.value.str.val);
+ }
if (body->u.constant.value.lval == ZEND_ACC_ABSTRACT) {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);