File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ '1234 ' |> var_dump (...);
Original file line number Diff line number Diff line change 1+ --TEST--
2+ GH-21504: Incorrect RC-handling for ZEND_EXT_STMT op1
3+ --FILE--
4+ <?php
5+
6+ $ php_escaped = getenv ('TEST_PHP_EXECUTABLE_ESCAPED ' );
7+ $ cmd = $ php_escaped . ' -n -e ' . escapeshellarg (__DIR__ . '/gh21504.inc ' );
8+ echo shell_exec ($ cmd );
9+
10+ ?>
11+ --EXPECT--
12+ string(4) "1234"
Original file line number Diff line number Diff line change @@ -1950,6 +1950,9 @@ static void zend_do_extended_stmt(znode* result) /* {{{ */
19501950
19511951 opline -> opcode = ZEND_EXT_STMT ;
19521952 if (result ) {
1953+ if (result -> op_type == IS_CONST ) {
1954+ Z_TRY_ADDREF (result -> u .constant );
1955+ }
19531956 SET_NODE (opline -> op1 , result );
19541957 }
19551958}
You can’t perform that action at this time.
0 commit comments