浏览代码

Overridden methods for UNWATCH and DISCARD in Predis\MultiExecBlock must return $this to not break method chaining.

Daniele Alessandri 14 年之前
父节点
当前提交
7d5cccaf7c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/Predis.php

+ 2 - 0
lib/Predis.php

@@ -896,6 +896,7 @@ class MultiExecBlock {
     public function unwatch() {
         $this->isWatchSupported();
         $this->_redisClient->unwatch();
+        return $this;
     }
 
     public function discard() {
@@ -903,6 +904,7 @@ class MultiExecBlock {
         $this->_commands    = array();
         $this->_initialized = false;
         $this->_discarded   = true;
+        return $this;
     }
 
     public function exec() {