From 4d06b6a841424e206663d69ccf441bbdb9d9ae82 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Gaudreau Date: Thu, 11 Apr 2013 10:50:01 -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 e6bae3fe45d..22dfefe41fa 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']; } //