From 32bc50a1351e7c70efff4ddbdcc8677aabdf58ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Thu, 4 May 2023 11:43:28 +0200 Subject: [PATCH] MDL-78120 login: handle empty wantsurl on login with alternateloginurl. --- login/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login/index.php b/login/index.php index 25312086d8a..ca9ddc994db 100644 --- a/login/index.php +++ b/login/index.php @@ -314,7 +314,7 @@ if (!empty($CFG->alternateloginurl)) { $loginurlstr = $loginurl->out(false); - if (strpos($SESSION->wantsurl, $loginurlstr) === 0) { + if (strpos($SESSION->wantsurl ?? '', $loginurlstr) === 0) { // We do not want to return to alternate url. $SESSION->wantsurl = null; }