File tree Expand file tree Collapse file tree 5 files changed +383
-351
lines changed Expand file tree Collapse file tree 5 files changed +383
-351
lines changed Original file line number Diff line number Diff line change 99 . Fixed bug #79895 (PHP_CHECK_GCC_ARG does not allow flags with equal sign).
1010 (Santiago M. Mola)
1111 . Fixed bug #79919 (Stack use-after-scope in define()). (cmb)
12+ . Fixed bug #79934 (CRLF-only line in heredoc causes parsing error).
13+ (Pieter van den Ham)
1214
1315- LDAP:
1416 . Fixed memory leaks. (ptomulik)
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Bug #79934: CRLF-only line in heredoc causes parsing error
3+ --DESCRIPTION--
4+ This test covers different variations of whitespace-only lines in heredoc strings.
5+ These whitespace-only lines should be ignored when stripping indentation.
6+ --FILE--
7+ <?php
8+ // lines with only CRLF should not cause a parse error
9+ eval ("\$s1 = <<<HEREDOC \r\n a \r\n\r\n b \r\n HEREDOC; " );
10+ var_dump (addcslashes ($ s1 , "\r\n" ));
11+
12+ // lines with only a LF should not cause a parse error
13+ eval ("\$s2 = <<<HEREDOC \n a \n\n b \n HEREDOC; " );
14+ var_dump (addcslashes ($ s2 , "\n" ));
15+
16+ // lines with only a CR should not cause a parse error
17+ eval ("\$s3 = <<<HEREDOC \r a \r\r b \r HEREDOC; " );
18+ var_dump (addcslashes ($ s3 , "\r" ));
19+
20+ // lines with only whitespace should not cause a parse error
21+ eval ("\$s4 = <<<HEREDOC \r a \r\n \r\n b \r HEREDOC; " );
22+ var_dump (addcslashes ($ s4 , "\n\r" ));
23+
24+ ?>
25+ --EXPECT--
26+ string(10) "a\r\n\r\nb"
27+ string(6) "a\n\nb"
28+ string(6) "a\r\rb"
29+ string(10) "a\r\n\r\nb"
You can’t perform that action at this time.
0 commit comments