fix: null-safe json_decode in RedisDriver; add getSessionModel test to MultiDriverTest

This commit is contained in:
Joel Male
2026-05-27 21:01:34 +10:00
parent 83aa9a1431
commit 71213d51f5
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ public function getItems(): array
{
$data = $this->redis->connection($this->connection)->get($this->itemsKey());
return $data ? json_decode($data, true) : [];
return $data ? (json_decode($data, true) ?? []) : [];
}
public function putItems(array $items): void
@@ -73,7 +73,7 @@ public function getConditions(): array
{
$data = $this->redis->connection($this->connection)->get($this->conditionsKey());
return $data ? json_decode($data, true) : [];
return $data ? (json_decode($data, true) ?? []) : [];
}
public function putConditions(array $conditions): void