File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ PHP NEWS
8484- Treewide:
8585 . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos)
8686
87+ - Windows:
88+ . Fixed bug GH-17836 (zend_vm_gen.php shouldn't break on Windows line
89+ endings). (DanielEScherzer)
90+
879127 Feb 2025, PHP 8.4.5
8892
8993- BCMath:
Original file line number Diff line number Diff line change @@ -2416,6 +2416,12 @@ function gen_vm($def, $skel) {
24162416 $ max_opcode = 0 ;
24172417 $ extra_num = 256 ;
24182418 foreach ($ in as $ line ) {
2419+ // Handle Windows line endings, GH-17836; since a bunch of regular
2420+ // expressions below test for a newline at the end, just update the
2421+ // ending
2422+ if (substr ($ line , -2 ) === "\r\n" ) {
2423+ $ line = substr_replace ($ line , "\n" , -2 );
2424+ }
24192425 ++$ lineno ;
24202426 if (strpos ($ line ,"ZEND_VM_HANDLER( " ) === 0 ||
24212427 strpos ($ line ,"ZEND_VM_INLINE_HANDLER( " ) === 0 ||
You can’t perform that action at this time.
0 commit comments