Skip to content

Commit 7c02b15

Browse files
authored
Merge pull request #697 from matt-catalyst/redis-duplicate-assertion
Fix duplicate assertion error using Redis Store
2 parents a867f5c + 50728b0 commit 7c02b15

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/SimpleSAML/Store/Redis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function get($type, $key)
7272

7373
$result = $this->redis->get("{$type}.{$key}");
7474

75-
if ($result === false) {
75+
if ($result === false || $result === null) {
7676
return null;
7777
}
7878

tests/lib/SimpleSAML/Store/RedisTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function setUp()
4848

4949
public function getMocked($key)
5050
{
51-
return array_key_exists($key, $this->config) ? $this->config[$key] : false;
51+
return array_key_exists($key, $this->config) ? $this->config[$key] : null;
5252
}
5353

5454
public function setMocked($key, $value)

0 commit comments

Comments
 (0)