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:
authormichael-grunder <michael.grunder@gmail.com>2014-03-09 22:06:46 +0400
committermichael-grunder <michael.grunder@gmail.com>2014-03-09 22:06:46 +0400
commitd2cb145099c2b7de548ddaa13b4619988b9c5c73 (patch)
tree90661ce3359405e13f89366bce603727234e4911
parent2552b29aca34afeeaaed9ec1cbeedf44c6511f1a (diff)
parent0bf19719513b7aeac327a61f39bdbfdcd2b2df86 (diff)
Merge branch 'hotfix/ra_type_check'ra_type_check
-rw-r--r--redis_array_impl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/redis_array_impl.c b/redis_array_impl.c
index 9f1a2238..6b125a4c 100644
--- a/redis_array_impl.c
+++ b/redis_array_impl.c
@@ -44,7 +44,9 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts, long retry_interval, zend_bool b
/* init connections */
for(i = 0; i < count; ++i) {
- if(FAILURE == zend_hash_quick_find(hosts, NULL, 0, i, (void**)&zpData)) {
+ if(FAILURE == zend_hash_quick_find(hosts, NULL, 0, i, (void**)&zpData) ||
+ Z_TYPE_PP(zpData) != IS_STRING)
+ {
efree(ra);
return NULL;
}