Skip to content

Commit 32e8d41

Browse files
committed
More fixes for PHP 5.4
1 parent 9577b82 commit 32e8d41

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

redis_array.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ PHP_METHOD(RedisArray, __construct)
251251

252252
if(ra) {
253253
ra->auto_rehash = b_autorehash;
254+
#if PHP_VERSION_ID >= 50400
255+
id = zend_list_insert(ra, le_redis_array TSRMLS_CC);
256+
#else
254257
id = zend_list_insert(ra, le_redis_array);
258+
#endif
255259
add_property_resource(getThis(), "socket", id);
256260
}
257261
}

redis_array_impl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts TSRMLS_DC)
7373
redis_sock_server_open(redis_sock, 1 TSRMLS_CC);
7474

7575
/* attach */
76+
#if PHP_VERSION_ID >= 50400
77+
id = zend_list_insert(redis_sock, le_redis_sock TSRMLS_CC);
78+
#else
7679
id = zend_list_insert(redis_sock, le_redis_sock);
80+
#endif
7781
add_property_resource(ra->redis[i], "socket", id);
7882
}
7983

0 commit comments

Comments
 (0)