Skip to content

Commit b185b4c

Browse files
committed
Fix #79934: CRLF-only line in heredoc causes parsing error
In `strip_multiline_string_indentation()` (Zend/zend_language_scanner.l) the case that is supposed to ignore whitespace-only lines now correctly handles CRLF-only lines.
1 parent 6a1bd57 commit b185b4c

File tree

3 files changed

+367
-352
lines changed

3 files changed

+367
-352
lines changed

Zend/tests/bug79934.phpt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
Bug #79934: CRLF-only line in heredoc causes parsing error
3+
--FILE--
4+
<?php
5+
eval("\$s = <<<HEREDOC\r\n a\r\n\r\n b\r\n HEREDOC;");
6+
var_dump($s);
7+
?>
8+
--EXPECT--
9+
string(6) "a
10+
11+
b"

0 commit comments

Comments
 (0)