mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix bug #71086
This commit is contained in:
2
NEWS
2
NEWS
@@ -10,6 +10,8 @@ PHP NEWS
|
||||
. Fixed bug #70781 (Extension tests fail on dynamic ext dependency).
|
||||
(Francois Laupretre)
|
||||
. Fixed bug #71089 (No check to duplicate zend_extension). (Remi)
|
||||
. Fixed bug #71086 (Invalid numeric literal parse error within
|
||||
highlight_string() function). (Nikita)
|
||||
|
||||
- DBA:
|
||||
. Fixed key leak with invalid resource. (Laruence)
|
||||
|
||||
14
Zend/tests/bug71086.phpt
Normal file
14
Zend/tests/bug71086.phpt
Normal file
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #71086: Invalid numeric literal parse error within highlight_string() function
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$highlightedString = highlight_string("<?php \n 09 09 09;", true);
|
||||
var_dump($highlightedString);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(169) "<code><span style="color: #000000">
|
||||
<span style="color: #0000BB"><?php <br /> </span><span style="color: #007700">09 09 09;</span>
|
||||
</span>
|
||||
</code>"
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "zend_highlight.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
#include "zend_globals.h"
|
||||
#include "zend_exceptions.h"
|
||||
|
||||
ZEND_API void zend_html_putc(char c)
|
||||
{
|
||||
@@ -168,6 +169,9 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
}
|
||||
zend_printf("</span>\n");
|
||||
zend_printf("</code>");
|
||||
|
||||
/* Discard parse errors thrown during tokenization */
|
||||
zend_clear_exception();
|
||||
}
|
||||
|
||||
ZEND_API void zend_strip(void)
|
||||
|
||||
Reference in New Issue
Block a user