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:
authorNicolas Favre-Felix <n.favrefelix@gmail.com>2011-11-09 17:33:27 +0400
committerNicolas Favre-Felix <n.favrefelix@gmail.com>2011-11-09 17:33:27 +0400
commit90a82d3d9cfe2f46d586a220195fc75d52aa3f0e (patch)
tree87ab500b8be3d1b569feee9b9334c29159d00862 /library.c
parentf367bde6044c23ce96da17ccc3703b02be0e7186 (diff)
Fixed issue with ZSCORE in MULTI/EXEC context.
This addresses GiHub issue #78.
Diffstat (limited to 'library.c')
-rw-r--r--library.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/library.c b/library.c
index 971808fd..e9409246 100644
--- a/library.c
+++ b/library.c
@@ -344,13 +344,18 @@ PHPAPI void redis_bulk_double_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *
double ret;
if ((response = redis_sock_read(redis_sock, &response_len TSRMLS_CC)) == NULL) {
- RETURN_FALSE;
+ IF_MULTI_OR_PIPELINE() {
+ add_next_index_bool(z_tab, 0);
+ } else {
+ RETURN_FALSE;
+ }
+ return;
}
ret = atof(response);
efree(response);
IF_MULTI_OR_PIPELINE() {
- add_next_index_double(z_tab, ret);
+ add_next_index_double(z_tab, ret);
} else {
RETURN_DOUBLE(ret);
}
@@ -362,7 +367,11 @@ PHPAPI void redis_type_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_s
long l;
if ((response = redis_sock_read(redis_sock, &response_len TSRMLS_CC)) == NULL) {
- RETURN_FALSE;
+ IF_MULTI_OR_PIPELINE() {
+ add_next_index_bool(z_tab, 0);
+ } else {
+ RETURN_FALSE;
+ }
}
if (strncmp(response, "+string", 7) == 0) {