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
84
84
- Treewide:
85
85
. Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos)
86
86
87
+ - Windows:
88
+ . Fixed bug GH-17836 (zend_vm_gen.php shouldn't break on Windows line
89
+ endings). (DanielEScherzer)
90
+
87
91
27 Feb 2025, PHP 8.4.5
88
92
89
93
- BCMath:
Original file line number Diff line number Diff line change @@ -2416,6 +2416,12 @@ function gen_vm($def, $skel) {
2416
2416
$ max_opcode = 0 ;
2417
2417
$ extra_num = 256 ;
2418
2418
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
+ }
2419
2425
++$ lineno ;
2420
2426
if (strpos ($ line ,"ZEND_VM_HANDLER( " ) === 0 ||
2421
2427
strpos ($ line ,"ZEND_VM_INLINE_HANDLER( " ) === 0 ||
You can’t perform that action at this time.
0 commit comments