summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-10-21 09:32:40 +0000
committerDmitry Stogov <dmitry@php.net>2005-10-21 09:32:40 +0000
commit7c3bdf444d0484010fa7b566ff75dee26872dca4 (patch)
treea0768dcb4bf54698576e7213ec9b864779d2337a
parent863bf8a5745489e24c961591d9cb531bd6acba72 (diff)
downloadphp-git-7c3bdf444d0484010fa7b566ff75dee26872dca4.tar.gz
Fixed bug #34782 (token_get_all() gives wrong result)
-rw-r--r--NEWS1
-rw-r--r--Zend/zend_language_scanner.l1
-rw-r--r--ext/tokenizer/tokenizer.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 8cfb9af536..40d0252c8d 100644
--- 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)
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index cd6c17f06e..96c21ca6f0 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -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)) {
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index 2e64c7f6a5..d3503c5be8 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -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);