diff options
author | Michael Grunder <michael.grunder@gmail.com> | 2020-09-28 21:07:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 21:07:46 +0300 |
commit | 950e8de807ba17ecfff62504a6ee7a959a5df714 (patch) | |
tree | b74010cca8baeb173be3edf216e66aa3e18b5f83 /redis.c | |
parent | 7e5191fb5645296b9e852fab7991820c1eaf0422 (diff) |
Issue.1847 cluster segfault (#1850)
Fix for #1847 when dealing with NULL multi bulk replies in RedisCluster.
Adds `Redis::OPT_NULL_MULTIBULK_AS_NULL` setting to have PhpRedis
treat NULL multi bulk replies as `NULL` instead of `[]`.
Co-authored-by: Alex Offshore <offshore@aopdg.ru>
Diffstat (limited to 'redis.c')
-rw-r--r-- | redis.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -713,6 +713,7 @@ static void add_class_constants(zend_class_entry *ce, int is_cluster) { zend_declare_class_constant_long(ce, ZEND_STRL("OPT_COMPRESSION"), REDIS_OPT_COMPRESSION); zend_declare_class_constant_long(ce, ZEND_STRL("OPT_REPLY_LITERAL"), REDIS_OPT_REPLY_LITERAL); zend_declare_class_constant_long(ce, ZEND_STRL("OPT_COMPRESSION_LEVEL"), REDIS_OPT_COMPRESSION_LEVEL); + zend_declare_class_constant_long(ce, ZEND_STRL("OPT_NULL_MULTIBULK_AS_NULL"), REDIS_OPT_NULL_MBULK_AS_NULL); /* serializer */ zend_declare_class_constant_long(ce, ZEND_STRL("SERIALIZER_NONE"), REDIS_SERIALIZER_NONE); |