Skip to content
Browse files

Fix KEYS when serializer is enabled.

  • Loading branch information...
1 parent b0d65a4 commit 393cfb0c8e45fcb94f189ebf680848741d8c30ad @nicolasff nicolasff committed Feb 22, 2011
Showing with 5 additions and 2 deletions.
  1. +2 −2 redis.c
  2. +3 −0 tests/TestRedis.php
View
4 redis.c
@@ -1115,12 +1115,12 @@ PHP_METHOD(Redis, getKeys)
REDIS_PROCESS_REQUEST(redis_sock, cmd, cmd_len);
IF_ATOMIC() {
- if (redis_sock_read_multibulk_reply(INTERNAL_FUNCTION_PARAM_PASSTHRU,
+ if (redis_sock_read_multibulk_reply_raw(INTERNAL_FUNCTION_PARAM_PASSTHRU,
redis_sock, NULL, NULL) < 0) {
RETURN_FALSE;
}
}
- REDIS_PROCESS_RESPONSE(redis_sock_read_multibulk_reply);
+ REDIS_PROCESS_RESPONSE(redis_sock_read_multibulk_reply_raw);
}
/* }}} */
View
3 tests/TestRedis.php
@@ -2685,6 +2685,9 @@ private function checkSerializer($mode) {
// multi-exec
$this->sequence(Redis::MULTI);
+ // keys
+ $this->assertTrue(is_array($this->redis->keys('*')));
+
// revert
$this->assertTrue($this->redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE) === TRUE); // set ok
$this->assertTrue($this->redis->getOption(Redis::OPT_SERIALIZER) === Redis::SERIALIZER_NONE); // get ok

0 comments on commit 393cfb0

Please sign in to comment.
Something went wrong with that request. Please try again.