From 8a4068988b26e5411edfad6ceeb14cda3b9245e8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 14 Feb 2020 16:49:43 +0100 Subject: Clarify that token_get_all() never returns false It can only fail in TOKEN_PARSE mode, in which case it will throw. --- ext/tokenizer/tokenizer.c | 4 +++- ext/tokenizer/tokenizer.stub.php | 2 +- ext/tokenizer/tokenizer_arginfo.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/tokenizer') diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index cf5be94226..1ac5275ff0 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -274,7 +274,9 @@ PHP_FUNCTION(token_get_all) zend_clear_exception(); } - if (!success) RETURN_FALSE; + if (!success) { + RETURN_THROWS(); + } } /* }}} */ diff --git a/ext/tokenizer/tokenizer.stub.php b/ext/tokenizer/tokenizer.stub.php index f42825d7dc..63a6c2e72c 100644 --- a/ext/tokenizer/tokenizer.stub.php +++ b/ext/tokenizer/tokenizer.stub.php @@ -1,5 +1,5 @@