[php-src] master: Zend: throw exception for AST error (#25141)

From: Date: Tue, 03 Nov 2026 18:52:17 +0000
Subject: [php-src] master: Zend: throw exception for AST error (#25141)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143283@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Committer: GitHub (web-flow) Pusher: Girgias Date: 2026-11-03T18:52:14Z Commit: https://github.com/php/php-src/commit/82840775bf0a5679d654462de4ef188dac5f800b Raw diff: https://github.com/php/php-src/commit/82840775bf0a5679d654462de4ef188dac5f800b.diff Zend: throw exception for AST error (#25141) Rather than bailing out with zend_error_noreturn() Changed paths: M Zend/zend_ast.c Diff: diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 5891974946d6..ca02f68e3a65 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1033,7 +1033,8 @@ static zend_result ZEND_FASTCALL zend_ast_evaluate_inner( break; case ZEND_AST_DIM: if (ast->child[1] == NULL) { - zend_error_noreturn(E_COMPILE_ERROR, "Cannot use [] for reading"); + zend_throw_error(NULL, "Cannot use [] for reading"); + return FAILURE; } if (UNEXPECTED(zend_ast_evaluate_ex(&op1, ast->child[0], scope, &short_circuited, ctx) != SUCCESS)) {

« previous php.cvs (#143283) next »