diff options
| author | Matt Wilmas <mattwil@php.net> | 2008-05-09 10:29:01 +0000 |
|---|---|---|
| committer | Matt Wilmas <mattwil@php.net> | 2008-05-09 10:29:01 +0000 |
| commit | 4d478c9b677fe4aef7c3143affb91a10679c4c27 (patch) | |
| tree | 5012ab582c83b48feb9e429c87d1cecc832f4aa9 | |
| parent | c6822cd9367b42fab2d7bd64b9ed544125315627 (diff) | |
| download | php-git-4d478c9b677fe4aef7c3143affb91a10679c4c27.tar.gz | |
MFH: Fix loss of backslash at end of heredoc; For bug #44830 (Very minor issue with backslash in heredoc)
| -rw-r--r-- | NEWS | 1 | ||||
| -rw-r--r-- | Zend/zend_language_scanner.l | 8 |
2 files changed, 3 insertions, 6 deletions
@@ -7,6 +7,7 @@ PHP NEWS as function parameter. (Rob) - Fixed bug #44836 (putenv() crashes, avoid direct reference of environ in POSIX systems). (Ilia, delphij at FreeBSD dot org) +- Fixed bug #44830 (Very minor issue with backslash in heredoc). (Matt) - Fixed bug #44811 (Improve error message when creating a new SoapClient that contains invalid data). (Markus Fischer, David C) - Fixed bug #44798 (Memory leak assigning value to attribute). (Ilia) diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 8356408b12..81881eee44 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -792,9 +792,7 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo while (s<end) { if (*s=='\\') { s++; - if (s>=end) { - continue; - } + switch(*s) { case 'n': *t++ = '\n'; @@ -1808,9 +1806,7 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({ while (s<end) { if (*s=='\\') { s++; - if (s>=end) { - continue; - } + switch(*s) { case '\\': case '\'': |
