diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2020-03-09 15:00:07 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2020-03-09 15:00:07 +0300 |
commit | 9ee94ca4f6212d1c6a7e8378c17df97d691068f7 (patch) | |
tree | 7783208cf9db8566f41076c6c72de99a87b84d81 /redis_array_impl.c | |
parent | 190c0d34ad718c2246d36b900475d216737263a5 (diff) |
fix usage php_hash_fetch_ops with PHP 8
Diffstat (limited to 'redis_array_impl.c')
-rw-r--r-- | redis_array_impl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/redis_array_impl.c b/redis_array_impl.c index 646b08a2..c3cfd2b6 100644 --- a/redis_array_impl.c +++ b/redis_array_impl.c @@ -551,7 +551,13 @@ ra_find_node(RedisArray *ra, const char *key, int key_len, int *out_pos) const php_hash_ops *ops; /* hash */ - if (ra->algorithm && (ops = php_hash_fetch_ops(ZSTR_VAL(ra->algorithm), ZSTR_LEN(ra->algorithm))) != NULL) { + if (ra->algorithm && ( +#if (PHP_VERSION_ID < 80000) + ops = php_hash_fetch_ops(ZSTR_VAL(ra->algorithm), ZSTR_LEN(ra->algorithm)) +#else + ops = php_hash_fetch_ops(ra->algorithm) +#endif + ) != NULL) { void *ctx = emalloc(ops->context_size); unsigned char *digest = emalloc(ops->digest_size); |