diff options
author | Mark <mrandall@digitellinc.com> | 2019-08-26 23:02:57 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2019-08-29 16:10:08 +0200 |
commit | 960da6dff8e200465e0aafad26b339a54aea131e (patch) | |
tree | 14854bc9b6313255d942b4ef79b10eef7d427361 /ext/hash/hash.c | |
parent | 14c07fef748126d634a5ef8115cf5f72b8903811 (diff) | |
download | php-git-960da6dff8e200465e0aafad26b339a54aea131e.tar.gz |
Warnings become errors hash stream functions (other than hash_init)
Diffstat (limited to 'ext/hash/hash.c')
-rw-r--r-- | ext/hash/hash.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; } } /* }}} */ |