Skip to content

Commit d25bb38

Browse files
authored
Merge pull request #1412 from fbnfgc/patch-1
Set phpredis multi() mode parameter
2 parents b928039 + 39c7e04 commit d25bb38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Monolog/Handler/RedisHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ protected function write(array $record)
7373
protected function writeCapped(array $record)
7474
{
7575
if ($this->redisClient instanceof \Redis) {
76-
$this->redisClient->multi()
76+
$mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1;
77+
$this->redisClient->multi($mode)
7778
->rpush($this->redisKey, $record["formatted"])
7879
->ltrim($this->redisKey, -$this->capSize, -1)
7980
->exec();

0 commit comments

Comments
 (0)