]> granicus.if.org Git - php/commitdiff
Fixed bug #34782 (token_get_all() gives wrong result)
authorDmitry Stogov <dmitry@php.net>
Fri, 21 Oct 2005 09:32:40 +0000 (09:32 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 21 Oct 2005 09:32:40 +0000 (09:32 +0000)
NEWS
Zend/zend_language_scanner.l
ext/tokenizer/tokenizer.c

diff --git a/NEWS b/NEWS
index 8cfb9af5366d5812b6914c5f898f4ee5267742ca..40d0252c8dfb3d65df7fcb590514c125a632891e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ PHP                                                                        NEWS
 - Fixed bug #34893 (PHP5.1 overloading, Cannot access private property).
   (Dmitry)
 - Fixed bug #34899 (Fixed sqlite extension compile failure). (Ilia)
+- Fixed bug #34782 (token_get_all() gives wrong result). (Dmitry)
 - Fixed bug #34767 (Zend Engine 1 Compatibility not copying objects correctly).
   (Dmitry)
 - Fixed bug #34712 (zend.ze1_compatibility_mode = on segfault). (Dmitry)
index cd6c17f06e549323f54671e2294734957dc007fb..96c21ca6f0dcc270595922a0274dfa2598afb0e2 100644 (file)
@@ -615,6 +615,7 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_
        if (zend_prepare_string_for_scanning(str, str_name TSRMLS_CC)==FAILURE) {
                return FAILURE;
        }
+       BEGIN(INITIAL);
        zend_highlight(syntax_highlighter_ini TSRMLS_CC);
 #ifdef ZEND_MULTIBYTE
        if (SCNG(script_org)) {
index 2e64c7f6a5d8964d6b08925dfd6536a486acad73..d3503c5be8c7945c54c83604820145ca8c1250bc 100644 (file)
@@ -519,6 +519,8 @@ PHP_FUNCTION(token_get_all)
                RETURN_EMPTY_STRING();
        }
 
+       LANG_SCNG(start) = 1;
+
        tokenize(return_value TSRMLS_CC);
        
        zend_restore_lexical_state(&original_lex_state TSRMLS_CC);