Ver Fonte

Reuse code.

Daniele Alessandri há 14 anos atrás
pai
commit
6dd3565c67
1 ficheiros alterados com 1 adições e 3 exclusões
  1. 1 3
      lib/Predis/PubSubContext.php

+ 1 - 3
lib/Predis/PubSubContext.php

@@ -84,9 +84,7 @@ class PubSubContext implements \Iterator {
     }
 
     private function writeCommand($method, $arguments) {
-        if (count($arguments) === 1 && is_array($arguments[0])) {
-            $arguments = $arguments[0];
-        }
+        $arguments = Helpers::filterArrayArguments($arguments);
         $command = $this->_client->createCommand($method, $arguments);
         $this->_client->getConnection()->writeCommand($command);
     }