cvs: ZendEngine2(PHP_5_1) / zend_compile.c
| From: | Andrei Zmievski | Date: | Thu, 23 Feb 2006 18:06:47 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_1) / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4617@lists.php.net to get a copy of this message | ||
andrei Thu Feb 23 18:06:47 2006 UTC
Modified files: (Branch: PHP_5_1)
/ZendEngine2 zend_compile.c
Log:
Fix a bug where the default value for function argument could be an
array with array (!) keys.
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.21&r2=1.647.2.22&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.21 ZendEngine2/zend_compile.c:1.647.2.22
--- ZendEngine2/zend_compile.c:1.647.2.21 Wed Jan 4 23:53:04 2006
+++ ZendEngine2/zend_compile.c Thu Feb 23 18:06:47 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.21 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.22 2006/02/23 18:06:47 andrei Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -3227,6 +3227,9 @@
case IS_DOUBLE:
zend_hash_index_update(result->u.constant.value.ht, (long)offset->u.constant.value.dval,
&element, sizeof(zval *), NULL);
break;
+ case IS_CONSTANT_ARRAY:
+ zend_error(E_ERROR, "Illegal offset type");
+ break;
}
} else {
zend_hash_next_index_insert(result->u.constant.value.ht, &element, sizeof(zval *), NULL);