Browse files

MDL-38637 CAS Authentication: Undefined index: QUERY_STRING when exec…

…uting cron
  • Loading branch information...
1 parent b3661ab commit d1f167aa56a9fce705a673327c03863fea69d398 @gaudreaj gaudreaj committed Apr 11, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 auth/cas/CAS/CAS.php
View
5 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'];
}
//

0 comments on commit d1f167a

Please sign in to comment.