Skip to content

Commit 02743f4

Browse files
committed
Fixed bug #71806
1 parent ccc5150 commit 02743f4

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ PHP NEWS
2525
. Fixed bug #71724 (yield from does not count EOLs). (Nikita)
2626
. Fixed bug #71767 (ReflectionMethod::getDocComment returns the wrong
2727
comment). (Grigorii Sokolik)
28+
. Fixed bug #71806 (php_strip_whitespace() fails on some numerical values).
29+
(Nikita)
2830

2931
- Curl:
3032
. Fixed bug #71694 (Support constant CURLM_ADDED_ALREADY). (mpyw)

Zend/zend_highlight.c

+3
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ ZEND_API void zend_strip(void)
228228
prev_space = 0;
229229
ZVAL_UNDEF(&token);
230230
}
231+
232+
/* Discard parse errors thrown during tokenization */
233+
zend_clear_exception();
231234
}
232235

233236
/*
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
/* comment */
3+
echo 098 ;
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
Bug #71806 (php_strip_whitespace() fails on some numerical values)
3+
--FILE--
4+
<?php
5+
6+
echo php_strip_whitespace(__DIR__ . '/bug71806.dat');
7+
8+
?>
9+
--EXPECT--
10+
<?php
11+
echo 098 ;

0 commit comments

Comments
 (0)