Explorar o código

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

Daniele Alessandri %!s(int64=14) %!d(string=hai) anos
pai
achega
1e4661cfc8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      lib/Predis.php

+ 2 - 0
lib/Predis.php

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