From 71e781b6868741beec728c24aaff37de6d549b1c Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Sat, 22 Feb 2020 16:53:02 +0100 Subject: [PATCH] Fix incorrect use of saml2 API --- lib/SimpleSAML/Session.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index 927f74e8b..1a6f73adb 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -238,7 +238,7 @@ class Session implements \Serializable, Utils\ClearableState foreach ($values as $idx => $value) { // this should be originally a DOMNodeList /* @var \SAML2\XML\saml\AttributeValue $value */ - $this->authData[$authority]['Attributes'][$attribute][$idx] = $value->element->childNodes; + $this->authData[$authority]['Attributes'][$attribute][$idx] = $value->getElement()->childNodes; } } } @@ -259,6 +259,7 @@ class Session implements \Serializable, Utils\ClearableState // check if we have stored a session stored with the session handler try { + /** @var \SimpleSAML\Session|null $session Help Scrutinizer with the correct type */ $session = self::getSession(); } catch (\Exception $e) { /* @@ -321,8 +322,8 @@ class Session implements \Serializable, Utils\ClearableState * * @param string|null $sessionId The session we should get, or null to get the current session. * - * @return Session|null The session that is stored in the session handler, or null if the session wasn't - * found. + * @return \SimpleSAML\Session|null The session that is stored in the session handler, + * or null if the session wasn't found. */ public static function getSession($sessionId = null) { @@ -392,8 +393,8 @@ class Session implements \Serializable, Utils\ClearableState * * Warning: never set self::$instance yourself, call this method instead. * - * @param Session $session The session to load. - * @return Session The session we just loaded, just for convenience. + * @param \SimpleSAML\Session $session The session to load. + * @return \SimpleSAML\Session The session we just loaded, just for convenience. */ private static function load(Session $session): Session { -- GitLab