From 2ec19aabbe63f8c2a3dd9c92bf1ddbfa809a7352 Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Wed, 5 Aug 2015 15:02:19 +0200 Subject: [PATCH] Fix an issue with data types returned by SimpleSAML_Store. --- lib/SimpleSAML/SessionHandler.php | 1 + lib/SimpleSAML/Store.php | 4 ++-- modules/saml/lib/SP/LogoutStore.php | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/SimpleSAML/SessionHandler.php b/lib/SimpleSAML/SessionHandler.php index 6beb5c947..debfba0b5 100644 --- a/lib/SimpleSAML/SessionHandler.php +++ b/lib/SimpleSAML/SessionHandler.php @@ -110,6 +110,7 @@ abstract class SimpleSAML_SessionHandler if ($store === false) { self::$sessionHandler = new SimpleSAML_SessionHandlerPHP(); } else { + /** @var SimpleSAML_Store $store At this point, $store can only be an object */ self::$sessionHandler = new SimpleSAML_SessionHandlerStore($store); } } diff --git a/lib/SimpleSAML/Store.php b/lib/SimpleSAML/Store.php index 0b3b8bd3b..3d638d88a 100644 --- a/lib/SimpleSAML/Store.php +++ b/lib/SimpleSAML/Store.php @@ -14,7 +14,7 @@ abstract class SimpleSAML_Store * * This is false if the data store isn't enabled, and null if we haven't attempted to initialize it. * - * @var SimpleSAML_Store|boolean|null + * @var SimpleSAML_Store|false|null */ private static $instance; @@ -22,7 +22,7 @@ abstract class SimpleSAML_Store /** * Retrieve our singleton instance. * - * @return SimpleSAML_Store|boolean The data store, or false if it isn't enabled. + * @return SimpleSAML_Store|false The data store, or false if it isn't enabled. */ public static function getInstance() { diff --git a/modules/saml/lib/SP/LogoutStore.php b/modules/saml/lib/SP/LogoutStore.php index fa78cdfac..b471f60e0 100644 --- a/modules/saml/lib/SP/LogoutStore.php +++ b/modules/saml/lib/SP/LogoutStore.php @@ -125,7 +125,7 @@ class sspmod_saml_SP_LogoutStore { /** * Retrieve all session IDs from a key-value store. * - * @param SimpleSAML_Store_SQL $store The datastore. + * @param SimpleSAML_Store $store The datastore. * @param string $authId The authsource ID. * @param string $nameId The hash of the users NameID. * @param array $sessionIndexes The session indexes. @@ -234,6 +234,7 @@ class sspmod_saml_SP_LogoutStore { /* We cannot fetch all sessions without a SQL store. */ return FALSE; } else { + /** @var SimpleSAML_Store $sessions At this point the store cannot be false */ $sessions = self::getSessionsStore($store, $authId, $strNameId, $sessionIndexes); } -- GitLab