diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-04-11 20:14:44 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-04-11 20:14:44 +0200 |
commit | ca447a8f6f65be565301350e27e0f6a57369a0f9 (patch) | |
tree | 7ee90353d152cbb614d57cc5b632d5c8016c02c0 | |
parent | ccf863c8ce7e746948fb060d515960492c41ed27 (diff) | |
parent | 096e40a027eb3df6364c3674660b8c9592e1f1b6 (diff) | |
download | php-git-ca447a8f6f65be565301350e27e0f6a57369a0f9.tar.gz |
Merge branch 'PHP-5.6'
-rw-r--r-- | Zend/zend_ast.c | 2 | ||||
-rw-r--r-- | tests/classes/constants_error_002.phpt | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index c5eff3467f..e486aa326c 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 be27971b87..610a42da9b 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=== |