Bläddra i källkod

Use arguments as defined by Redis when calling WATCH internally.

Daniele Alessandri 10 år sedan
förälder
incheckning
ba5e501346
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/Transaction/MultiExec.php

+ 2 - 2
src/Transaction/MultiExec.php

@@ -176,7 +176,7 @@ class MultiExec implements ClientContextInterface
      *
      * @throws ServerException
      */
-    protected function call($commandID, $arguments = array())
+    protected function call($commandID, array $arguments = array())
     {
         $command  = $this->client->createCommand($commandID, $arguments);
         $response = $this->client->executeCommand($command);
@@ -239,7 +239,7 @@ class MultiExec implements ClientContextInterface
             throw new ClientException('Sending WATCH after MULTI is not allowed.');
         }
 
-        $response = $this->call('watch', array($keys));
+        $response = $this->call('watch', is_array($keys) ? $keys : array($keys));
 
         $this->state->flag(MultiExecState::WATCH);