File tree 3 files changed +20
-0
lines changed
3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ PHP NEWS
10
10
. Fixed bug #70781 (Extension tests fail on dynamic ext dependency).
11
11
(Francois Laupretre)
12
12
. Fixed bug #71089 (No check to duplicate zend_extension). (Remi)
13
+ . Fixed bug #71086 (Invalid numeric literal parse error within
14
+ highlight_string() function). (Nikita)
13
15
14
16
- DBA:
15
17
. Fixed key leak with invalid resource. (Laruence)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #71086: Invalid numeric literal parse error within highlight_string() function
3
+ --FILE--
4
+ <?php
5
+
6
+ $ highlightedString = highlight_string ("<?php \n 09 09 09; " , true );
7
+ var_dump ($ highlightedString );
8
+
9
+ ?>
10
+ --EXPECT--
11
+ string(169) "<code><span style="color: #000000">
12
+ <span style="color: #0000BB"><?php <br /> </span><span style="color: #007700">09 09 09;</span>
13
+ </span>
14
+ </code>"
Original file line number Diff line number Diff line change 25
25
#include "zend_highlight.h"
26
26
#include "zend_ptr_stack.h"
27
27
#include "zend_globals.h"
28
+ #include "zend_exceptions.h"
28
29
29
30
ZEND_API void zend_html_putc (char c )
30
31
{
@@ -168,6 +169,9 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
168
169
}
169
170
zend_printf ("</span>\n" );
170
171
zend_printf ("</code>" );
172
+
173
+ /* Discard parse errors thrown during tokenization */
174
+ zend_clear_exception ();
171
175
}
172
176
173
177
ZEND_API void zend_strip (void )
You can’t perform that action at this time.
0 commit comments