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:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-10-31 18:11:36 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-10-31 23:59:59 +0300
commit7919b5c0aa1502608ecf997fdd984ab28eec4481 (patch)
treef8c20842bfb7b3d0e2099fc44860837c4ac676c3 /redis_array_impl.c
parent8bacfea31cad548bb23c0bbd495db776b680037e (diff)
WIP: php7 compatibility
Wrap zend_is_callable_ex + session handlers
Diffstat (limited to 'redis_array_impl.c')
-rw-r--r--redis_array_impl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/redis_array_impl.c b/redis_array_impl.c
index 01c40580..7e814fef 100644
--- a/redis_array_impl.c
+++ b/redis_array_impl.c
@@ -402,7 +402,11 @@ ra_call_extractor(RedisArray *ra, const char *key, int key_len, int *out_len TSR
zval z_ret, z_argv[1];
/* check that we can call the extractor function */
+#if (PHP_MAJOR_VERSION < 7)
if(!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) {
+#else
+ if (!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL)) {
+#endif
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call extractor function");
return NULL;
}
@@ -451,7 +455,11 @@ ra_call_distributor(RedisArray *ra, const char *key, int key_len, int *pos TSRML
zval z_argv[1];
/* check that we can call the extractor function */
+#if (PHP_MAJOR_VERSION < 7)
if(!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) {
+#else
+ if (!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL)) {
+#endif
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call distributor function");
return 0;
}