From d1f167aa56a9fce705a673327c03863fea69d398 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Gaudreau Date: Thu, 11 Apr 2013 09:02:37 -0400 Subject: [PATCH] MDL-38637 CAS Authentication: Undefined index: QUERY_STRING when executing cron --- auth/cas/CAS/CAS.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/auth/cas/CAS/CAS.php b/auth/cas/CAS/CAS.php index 975c0e58996..f9c60faea7d 100644 --- a/auth/cas/CAS/CAS.php +++ b/auth/cas/CAS/CAS.php @@ -32,8 +32,9 @@ // // hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS // -if (!isset($_SERVER['REQUEST_URI'])) { - $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']; +$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; +if (isset($_SERVER['QUERY_STRING'])) { + $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; } //