summaryrefslogtreecommitdiff
path: root/ext/tokenizer/tokenizer.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2010-05-30 09:34:02 (GMT)
committerJohannes Schlüter <johannes@php.net>2010-05-30 09:34:02 (GMT)
commit27299b7e4084adb236acfbfb25168d72306ee802 (patch)
treef431e544638943c0fb33f7bd6aac365b34f3f0ba /ext/tokenizer/tokenizer.c
parent91721f73f2fb683b25f96e1f68348b62d057ee0f (diff)
downloadphp-27299b7e4084adb236acfbfb25168d72306ee802.tar.gz
- token_get_all now returns false on error, not "", returns array on success
Diffstat (limited to 'ext/tokenizer/tokenizer.c')
-rw-r--r--ext/tokenizer/tokenizer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index e5e8067..0ffe83d 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -164,15 +164,16 @@ PHP_FUNCTION(token_get_all)
zval source_z;
zend_lex_state original_lex_state;
- if (zend_parse_parameters(argc TSRMLS_CC, "s", &source, &source_len) == FAILURE)
+ if (zend_parse_parameters(argc TSRMLS_CC, "s", &source, &source_len) == FAILURE) {
return;
+ }
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) {
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
- RETURN_EMPTY_STRING();
+ RETURN_FALSE;
}
LANG_SCNG(yy_state) = yycINITIAL;