Skip to content

Commit d2cb145

Browse files
Merge branch 'hotfix/ra_type_check'
2 parents 2552b29 + 0bf1971 commit d2cb145

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

redis_array_impl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts, long retry_interval, zend_bool b
4444

4545
/* init connections */
4646
for(i = 0; i < count; ++i) {
47-
if(FAILURE == zend_hash_quick_find(hosts, NULL, 0, i, (void**)&zpData)) {
47+
if(FAILURE == zend_hash_quick_find(hosts, NULL, 0, i, (void**)&zpData) ||
48+
Z_TYPE_PP(zpData) != IS_STRING)
49+
{
4850
efree(ra);
4951
return NULL;
5052
}

0 commit comments

Comments
 (0)