com php-src: Fixed tests for recent constant array changes: Zend/zend_ast.c tests/classes/constants_error_00 2.phpt

From: Date: Fri, 11 Apr 2014 18:13:24 +0000
Subject: com php-src: Fixed tests for recent constant array changes: Zend/zend_ast.c tests/classes/constants_error_00 2.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76795@lists.php.net to get a copy of this message
Commit: 096e40a027eb3df6364c3674660b8c9592e1f1b6 Author: Bob Weinand <bobwei9@hotmail.com> Fri, 11 Apr 2014 20:13:24 +0200 Parents: 99d1a1bb3f96364d1ee7bf3e9c84215001200112 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=096e40a027eb3df6364c3674660b8c9592e1f1b6 Log: Fixed tests for recent constant array changes Changed paths: M Zend/zend_ast.c M tests/classes/constants_error_002.phpt Diff: diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index d7fbba1..583a523 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -351,9 +351,11 @@ ZEND_API zend_ast *zend_ast_copy(zend_ast *ast) zend_ast *new = emalloc(sizeof(zend_ast) + sizeof(zend_ast*) * (ast->children - 1)); int i; new->kind = ast->kind; + new->children = ast->children; for (i = 0; i < ast->children; i++) { (&new->u.child)[i] = zend_ast_copy((&ast->u.child)[i]); } + return new; } return zend_ast_create_dynamic(ast->kind); } diff --git a/tests/classes/constants_error_002.phpt b/tests/classes/constants_error_002.phpt index be27971...610a42d 100644 --- a/tests/classes/constants_error_002.phpt +++ b/tests/classes/constants_error_002.phpt @@ -2,11 +2,11 @@ Error case: class constant as an array --FILE-- <?php - class myclass - { - const myConst = array(); - } +class myclass +{ + const myConst = array(); +} ?> +===DONE=== --EXPECTF-- - -Fatal error: Arrays are not allowed in class constants in %s on line 4 +===DONE===

« previous php.cvs (#76795) next »