Jelajahi Sumber

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

Daniele Alessandri 14 tahun lalu
induk
melakukan
7d5cccaf7c
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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() {