Skip to content

Commit 63beda2

Browse files
committed
fix: close() should return false if releaseLock() failed
The return value (usually true on success, false on failure) https://www.php.net/manual/en/sessionhandlerinterface.close.php#refsect1-sessionhandlerinterface.close-returnvalues
1 parent 849b93a commit 63beda2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/Session/Handlers/RedisHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ public function close(): bool
231231

232232
if (($pingReply === true) || ($pingReply === '+PONG')) {
233233
if (isset($this->lockKey)) {
234-
$this->releaseLock();
234+
if (! $this->releaseLock()) {
235+
return false;
236+
}
235237
}
236238

237239
if (! $this->redis->close()) {

0 commit comments

Comments
 (0)