mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fix trailing if element JMP lineno
This commit is contained in:
3
NEWS
3
NEWS
@@ -6,6 +6,9 @@ PHP NEWS
|
||||
. Implement GH-10024 (support linting multiple files at once using php -l).
|
||||
(nielsdos)
|
||||
|
||||
- Core:
|
||||
. Fixed line number of JMP instruction over else block. (ilutov)
|
||||
|
||||
06 Jul 2023, PHP 8.3.0alpha3
|
||||
|
||||
- Core:
|
||||
|
||||
@@ -5567,6 +5567,9 @@ static void zend_compile_if(zend_ast *ast) /* {{{ */
|
||||
zend_compile_stmt(stmt_ast);
|
||||
|
||||
if (i != list->children - 1) {
|
||||
/* Set the lineno of JMP to the position of the if keyword, as we don't want to
|
||||
* report the last line in the if branch as covered if it hasn't actually executed. */
|
||||
CG(zend_lineno) = elem_ast->lineno;
|
||||
jmp_opnums[i] = zend_emit_jump(0);
|
||||
}
|
||||
zend_update_jump_target_to_next(opnum_jmpz);
|
||||
|
||||
Reference in New Issue
Block a user