From 960da6dff8e200465e0aafad26b339a54aea131e Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 26 Aug 2019 23:02:57 +0100 Subject: Warnings become errors hash stream functions (other than hash_init) --- ext/hash/hash.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/hash/hash.c') diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 82c27afd64..a26b9a3767 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -414,8 +414,8 @@ PHP_FUNCTION(hash_init) #define PHP_HASHCONTEXT_VERIFY(func, hash) { \ if (!hash->context) { \ - php_error(E_WARNING, "%s(): supplied resource is not a valid Hash Context resource", func); \ - RETURN_NULL(); \ + zend_throw_error(NULL, "%s(): supplied resource is not a valid Hash Context resource", func); \ + return; \ } \ } @@ -585,7 +585,9 @@ PHP_FUNCTION(hash_copy) if (php_hashcontext_from_object(Z_OBJ_P(return_value))->context == NULL) { zval_ptr_dtor(return_value); - RETURN_FALSE; + + zend_throw_error(NULL, "Cannot copy hash"); + return; } } /* }}} */ -- cgit v1.2.1