Browse Source

Reuse code.

Daniele Alessandri 14 years ago
parent
commit
6dd3565c67
1 changed files with 1 additions and 3 deletions
  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);
     }