From 02743f43c2de313e30320f2fb2d995937ce9881b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 11 Mar 2016 22:45:38 +0100 Subject: [PATCH] Fixed bug #71806 --- NEWS | 2 ++ Zend/zend_highlight.c | 3 +++ ext/standard/tests/strings/bug71806.dat | 3 +++ ext/standard/tests/strings/bug71806.phpt | 11 +++++++++++ 4 files changed, 19 insertions(+) create mode 100644 ext/standard/tests/strings/bug71806.dat create mode 100644 ext/standard/tests/strings/bug71806.phpt diff --git a/NEWS b/NEWS index bf9223b6f6..ddbacdd051 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 34fc4c2268..bc6456cee6 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 0000000000..c999da61c2 --- /dev/null +++ b/ext/standard/tests/strings/bug71806.dat @@ -0,0 +1,3 @@ + +--EXPECT-- +