Skip to content

Commit 942ca2d

Browse files
committed
fix: socket connection in RedisHandler class
1 parent 8ebf360 commit 942ca2d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

system/Session/Handlers/RedisHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function open($path, $name): bool
119119

120120
$redis = new Redis();
121121

122-
if (! $redis->connect($this->savePath['host'], $this->savePath['port'], $this->savePath['timeout'])) {
122+
if (! $redis->connect($this->savePath['host'], ($this->savePath['host'][0] === '/' ? 0 : $this->savePath['port']), $this->savePath['timeout'])) {
123123
$this->logger->error('Session: Unable to connect to Redis with the configured settings.');
124124
} elseif (isset($this->savePath['password']) && ! $redis->auth($this->savePath['password'])) {
125125
$this->logger->error('Session: Unable to authenticate to Redis instance.');

user_guide_src/source/changelogs/v4.2.11.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ Bugs Fixed
1313
**********
1414

1515
- Fixed a ``FileLocator::locateFile()`` bug where a similar namespace name could be replaced by another, causing a failure to find a file that exists.
16+
- Fixed a ``RedisHandler`` session class to use the correct config when used with a socket connection.
17+
- Fixed a ``FeatureTestTrait`` to use Services class for grabbing the ``IncomingRequest`` class.
1618

1719
See the repo's `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_ for a complete list of bugs fixed.

0 commit comments

Comments
 (0)