mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix uninitialized lineno in constant AST of internal enums
This commit is contained in:
commit
837a8b60bf
1 changed files with 3 additions and 0 deletions
|
@ -548,12 +548,14 @@ static zend_ast_ref *create_enum_case_ast(
|
|||
ast->child[0]->attr = 0;
|
||||
ZEND_ASSERT(ZSTR_IS_INTERNED(class_name));
|
||||
ZVAL_STR(zend_ast_get_zval(ast->child[0]), class_name);
|
||||
Z_LINENO_P(zend_ast_get_zval(ast->child[0])) = 0;
|
||||
|
||||
ast->child[1] = (zend_ast *) p; p += sizeof(zend_ast_zval);
|
||||
ast->child[1]->kind = ZEND_AST_ZVAL;
|
||||
ast->child[1]->attr = 0;
|
||||
ZEND_ASSERT(ZSTR_IS_INTERNED(case_name));
|
||||
ZVAL_STR(zend_ast_get_zval(ast->child[1]), case_name);
|
||||
Z_LINENO_P(zend_ast_get_zval(ast->child[1])) = 0;
|
||||
|
||||
if (value) {
|
||||
ast->child[2] = (zend_ast *) p; p += sizeof(zend_ast_zval);
|
||||
|
@ -561,6 +563,7 @@ static zend_ast_ref *create_enum_case_ast(
|
|||
ast->child[2]->attr = 0;
|
||||
ZEND_ASSERT(!Z_REFCOUNTED_P(value));
|
||||
ZVAL_COPY_VALUE(zend_ast_get_zval(ast->child[2]), value);
|
||||
Z_LINENO_P(zend_ast_get_zval(ast->child[2])) = 0;
|
||||
} else {
|
||||
ast->child[2] = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue