Skip to content

Commit 370e5af

Browse files
committed
Fetch Redis server info for sentinel replicated connections
1 parent a4a0584 commit 370e5af

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- Fixed issue with Predis and `SentinelReplication` connection
6+
37
## 2.5.3
48

59
- Added `WP_REDIS_DISABLE_GROUP_FLUSH` constant

includes/object-cache.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ public function fetch_info() {
11471147
$info = $this->is_predis()
11481148
? $this->redis->getClientBy( 'id', $connectionId )->info()
11491149
: $this->redis->info( $connectionId );
1150-
} else if ($this->is_predis() && $this->redis->getConnection() instanceof Predis\Connection\Replication\MasterSlaveReplication) {
1150+
} else if ($this->is_predis() && $this->redis->getConnection() instanceof Predis\Connection\Replication\ReplicationInterface) {
11511151
$info = $this->redis->getClientBy( 'role' , 'master' )->info();
11521152
} else {
11531153
$info = $this->redis->info();

0 commit comments

Comments
 (0)