Daniele Alessandri 11 роки тому
батько
коміт
cdb91284f1
1 змінених файлів з 7 додано та 2 видалено
  1. 7 2
      lib/Predis/Client.php

+ 7 - 2
lib/Predis/Client.php

@@ -366,8 +366,13 @@ class Client implements ClientInterface
      */
     protected function createTransaction(Array $options = null, $callable = null)
     {
-        $transaction = new MultiExecContext($this, $options ?: array());
-        return isset($callable) ? $transaction->execute($callable) : $transaction;
+        $transaction = new MultiExecContext($this, $options);
+
+        if (isset($callable)) {
+            return $transaction->execute($callable);
+        }
+
+        return $transaction;
     }
 
     /**