瀏覽代碼

Reuse code.

Daniele Alessandri 14 年之前
父節點
當前提交
6dd3565c67
共有 1 個文件被更改,包括 1 次插入3 次删除
  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);
     }