Skip to content

Commit

Permalink
Fix duplicate assertion error using Redis Store
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-catalyst authored and thijskh committed Nov 8, 2017
1 parent e795098 commit 1a2402f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/SimpleSAML/Store/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function get($type, $key)

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

if ($result === false) {
if ($result === false || $result === null) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/SimpleSAML/Store/RedisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function setUp()

public function getMocked($key)
{
return array_key_exists($key, $this->config) ? $this->config[$key] : false;
return array_key_exists($key, $this->config) ? $this->config[$key] : null;
}

public function setMocked($key, $value)
Expand Down

0 comments on commit 1a2402f

Please sign in to comment.