diff --git a/src/M6Web/Component/RedisMock/RedisMock.php b/src/M6Web/Component/RedisMock/RedisMock.php index ecd1db5..fc47653 100644 --- a/src/M6Web/Component/RedisMock/RedisMock.php +++ b/src/M6Web/Component/RedisMock/RedisMock.php @@ -1155,7 +1155,9 @@ public function rpoplpush(string $sourceList, string $destinationList) $rpopValue = $this->rpop($sourceList); // LPUSH (send the value at the end of the $destinationList) - $this->lpush($destinationList, $rpopValue); + if (null !== $rpopValue){ + $this->lpush($destinationList, $rpopValue); + } // return the rpop value; return $rpopValue;