summaryrefslogtreecommitdiff
path: root/ext/tokenizer/tokenizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tokenizer/tokenizer.c')
-rw-r--r--ext/tokenizer/tokenizer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index 242bbcd04f..1c589faecb 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -480,7 +480,7 @@ PHP_FUNCTION(token_get_all)
if (zend_parse_parameters(argc TSRMLS_CC, "s", &source, &source_len) == FAILURE)
return;
- ZVAL_STRINGL(&source_z, source, source_len, 0);
+ ZVAL_STRINGL(&source_z, source, source_len, 1);
zend_save_lexical_state(&original_lex_state TSRMLS_CC);
if (zend_prepare_string_for_scanning(&source_z, "" TSRMLS_CC) == FAILURE) {
@@ -490,6 +490,7 @@ PHP_FUNCTION(token_get_all)
tokenize(return_value TSRMLS_CC);
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
+ zval_dtor(&source_z);
}
/* }}} */