summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wilmas <mattwil@php.net>2008-05-09 10:29:01 +0000
committerMatt Wilmas <mattwil@php.net>2008-05-09 10:29:01 +0000
commit4d478c9b677fe4aef7c3143affb91a10679c4c27 (patch)
tree5012ab582c83b48feb9e429c87d1cecc832f4aa9
parentc6822cd9367b42fab2d7bd64b9ed544125315627 (diff)
downloadphp-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--NEWS1
-rw-r--r--Zend/zend_language_scanner.l8
2 files changed, 3 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 0a446f6e8b..791ae06594 100644
--- a/NEWS
+++ b/NEWS
@@ -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 '\'':