if (property_exists($SESSION, 'logout')) { $this->logouturl = $SESSION->logout; }
Doesn't check if the $SESSION is not empty or not before the logout check is run. In cases where no SESSION has been generated yet this will throw a property doesn't exist fault.
if (!is_null($SESSION) && property_exists($SESSION, 'logout')) { $this->logouturl = $SESSION->logout; }
https://github.com/Oomaxpro/moodle-auth_cognito/blob/main/auth.php#L53
if (property_exists($SESSION, 'logout')) { $this->logouturl = $SESSION->logout; }
Doesn't check if the $SESSION is not empty or not before the logout check is run. In cases where no SESSION has been generated yet this will throw a property doesn't exist fault.
if (!is_null($SESSION) && property_exists($SESSION, 'logout')) { $this->logouturl = $SESSION->logout; }
Fixes the sanity fault.