com php-src: Fixed bug #71806: NEWS Zend/zend_highlight.c ext/standard/tests/strings/bug71806.dat ext/st andard/tests/strings/bug71806.phpt
| From: | Nikita Popov | Date: | Fri, 11 Mar 2016 21:45:38 +0000 |
| Subject: | com php-src: Fixed bug #71806: NEWS Zend/zend_highlight.c ext/standard/tests/strings/bug71806.dat ext/st andard/tests/strings/bug71806.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91332@lists.php.net to get a copy of this message | ||
Commit: 02743f43c2de313e30320f2fb2d995937ce9881b
Author: Nikita Popov <nikic@php.net> Fri, 11 Mar 2016 22:45:38 +0100
Parents: ccc5150f15c747fe5e9b5a17fcb135e7989d0181
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=02743f43c2de313e30320f2fb2d995937ce9881b
Log:
Fixed bug #71806
Bugs:
https://bugs.php.net/71806
Changed paths:
M NEWS
M Zend/zend_highlight.c
A ext/standard/tests/strings/bug71806.dat
A ext/standard/tests/strings/bug71806.phpt
Diff:
diff --git a/NEWS b/NEWS
index bf9223b..ddbacdd 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ PHP NEWS
. Fixed bug #71724 (yield from does not count EOLs). (Nikita)
.. Fixed bug #71767 (ReflectionMethod::getDocComment returns the wrong
comment). (Grigorii Sokolik)
+ . Fixed bug #71806 (php_strip_whitespace() fails on some numerical values).
+ (Nikita)
- Curl:
. Fixed bug #71694 (Support constant CURLM_ADDED_ALREADY). (mpyw)
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c
index 34fc4c2..bc6456c 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -228,6 +228,9 @@ ZEND_API void zend_strip(void)
prev_space = 0;
ZVAL_UNDEF(&token);
}
+
+ /* Discard parse errors thrown during tokenization */
+ zend_clear_exception();
}
/*
diff --git a/ext/standard/tests/strings/bug71806.dat b/ext/standard/tests/strings/bug71806.dat
new file mode 100644
index 0000000..c999da6
--- /dev/null
+++ b/ext/standard/tests/strings/bug71806.dat
@@ -0,0 +1,3 @@
+<?php
+/* comment */
+echo 098 ;
diff --git a/ext/standard/tests/strings/bug71806.phpt b/ext/standard/tests/strings/bug71806.phpt
new file mode 100644
index 0000000..6eb534d
--- /dev/null
+++ b/ext/standard/tests/strings/bug71806.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #71806 (php_strip_whitespace() fails on some numerical values)
+--FILE--
+<?php
+
+echo php_strip_whitespace(__DIR__ . '/bug71806.dat');
+
+?>
+--EXPECT--
+<?php
+ echo 098 ;