diff --git a/lib/SimpleSAML/Store/Redis.php b/lib/SimpleSAML/Store/Redis.php index 221b3d6287d18ed9a93f2ec6fda3382234ef604c..2f568e3600544953edfd2c43384ffe1be654850e 100644 --- a/lib/SimpleSAML/Store/Redis.php +++ b/lib/SimpleSAML/Store/Redis.php @@ -72,7 +72,7 @@ class Redis extends Store $result = $this->redis->get("{$type}.{$key}"); - if ($result === false) { + if ($result === false || $result === null) { return null; } diff --git a/tests/lib/SimpleSAML/Store/RedisTest.php b/tests/lib/SimpleSAML/Store/RedisTest.php index 7eecdf310b86e757b1fabff755036954470d9a10..329f57113374e7e7d5f1ca6cc455077520f2b318 100644 --- a/tests/lib/SimpleSAML/Store/RedisTest.php +++ b/tests/lib/SimpleSAML/Store/RedisTest.php @@ -48,7 +48,7 @@ class RedisTest extends \PHPUnit_Framework_TestCase 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)