From 8596eac45e1f6defc4036fac9375487e8abc63e7 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Wed, 20 Mar 2013 09:00:57 -0700 Subject: 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 #318 --- redis_array_impl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/redis_array_impl.c b/redis_array_impl.c index d5370c82..0c361d74 100644 --- a/redis_array_impl.c +++ b/redis_array_impl.c @@ -288,12 +288,12 @@ ra_make_array(HashTable *hosts, zval *z_fun, zval *z_dist, HashTable *hosts_prev char * ra_call_extractor(RedisArray *ra, const char *key, int key_len, int *out_len TSRMLS_DC) { - char *error = NULL, *out; + char *out; zval z_ret; zval *z_argv0; /* check that we can call the extractor function */ - if(!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL, &error TSRMLS_CC)) { + if(!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call extractor function"); return NULL; } @@ -349,12 +349,11 @@ ra_extract_key(RedisArray *ra, const char *key, int key_len, int *out_len TSRMLS zend_bool ra_call_distributor(RedisArray *ra, const char *key, int key_len, int *pos TSRMLS_DC) { - char *error = NULL; zval z_ret; zval *z_argv0; /* check that we can call the extractor function */ - if(!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL, &error TSRMLS_CC)) { + if(!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call distributor function"); return 0; } -- cgit v1.2.3