Skip to content

Commit 8596eac

Browse files
Use another NULL for zend_is_callable_ex
Given that PHP 5.2.X and PHP 5.3.X use a different signature for zend_is_callable_ex, and we're not using the error return (PHP 5.3.X) anyway, just pass in NULL. Addresses issue phpredis#318
1 parent d287163 commit 8596eac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

redis_array_impl.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,12 @@ ra_make_array(HashTable *hosts, zval *z_fun, zval *z_dist, HashTable *hosts_prev
288288
char *
289289
ra_call_extractor(RedisArray *ra, const char *key, int key_len, int *out_len TSRMLS_DC) {
290290

291-
char *error = NULL, *out;
291+
char *out;
292292
zval z_ret;
293293
zval *z_argv0;
294294

295295
/* check that we can call the extractor function */
296-
if(!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL, &error TSRMLS_CC)) {
296+
if(!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) {
297297
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call extractor function");
298298
return NULL;
299299
}
@@ -349,12 +349,11 @@ ra_extract_key(RedisArray *ra, const char *key, int key_len, int *out_len TSRMLS
349349
zend_bool
350350
ra_call_distributor(RedisArray *ra, const char *key, int key_len, int *pos TSRMLS_DC) {
351351

352-
char *error = NULL;
353352
zval z_ret;
354353
zval *z_argv0;
355354

356355
/* check that we can call the extractor function */
357-
if(!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL, &error TSRMLS_CC)) {
356+
if(!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) {
358357
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call distributor function");
359358
return 0;
360359
}

0 commit comments

Comments
 (0)