Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefender-11 <guchangsheng@hotmail.com>2021-01-22 19:52:55 +0300
committerdefender-11 <guchangsheng@hotmail.com>2021-01-22 19:52:55 +0300
commitc61396c4898f618373cbbd7c6adc7faf2746f953 (patch)
tree7f8abd3cab3f191988e7a9e0c45816b5a38ae357 /redis_array_impl.c
parente9ba9ff12e74c3483f2cb54b7fc9fb7250829a2a (diff)
Fixed#1895
Diffstat (limited to 'redis_array_impl.c')
-rw-r--r--redis_array_impl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/redis_array_impl.c b/redis_array_impl.c
index e34d43d1..37a84ba7 100644
--- a/redis_array_impl.c
+++ b/redis_array_impl.c
@@ -494,7 +494,11 @@ ra_find_node(RedisArray *ra, const char *key, int key_len, int *out_pos)
void *ctx = emalloc(ops->context_size);
unsigned char *digest = emalloc(ops->digest_size);
+#if PHP_VERSION_ID >= 80100
+ ops->hash_init(ctx,NULL);
+#else
ops->hash_init(ctx);
+#endif
ops->hash_update(ctx, (const unsigned char *)ZSTR_VAL(out), ZSTR_LEN(out));
ops->hash_final(digest, ctx);