cvs: ZendEngine2 / zend_compile.c

From: Date: Fri, 09 Jan 2004 14:02:33 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2187@lists.php.net to get a copy of this message
stas Fri Jan 9 09:02:33 2004 EDT Modified files: /ZendEngine2 zend_compile.c Log: Bug #25816 - disallow arrays in class constants Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.509 ZendEngine2/zend_compile.c:1.510 --- ZendEngine2/zend_compile.c:1.509 Fri Jan 9 08:52:18 2004 +++ ZendEngine2/zend_compile.c Fri Jan 9 09:02:33 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.509 2004/01/09 13:52:18 stas Exp $ */ +/* $Id: zend_compile.c,v 1.510 2004/01/09 14:02:33 stas Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -2492,6 +2492,10 @@ { zval *property; + if(Z_TYPE(value->u.constant) == IS_CONSTANT_ARRAY) { + zend_error(E_COMPILE_ERROR, "Arrays are not allowed in class constants"); + } + ALLOC_ZVAL(property); if (value) {

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