]> git.mjollnir.org Git - moodle.git/commitdiff
course/jumpto.php MDL-19886 Don't depend on HTTP_REFFER header
authorpoltawski <poltawski>
Wed, 26 Aug 2009 09:52:14 +0000 (09:52 +0000)
committerpoltawski <poltawski>
Wed, 26 Aug 2009 09:52:14 +0000 (09:52 +0000)
thanks to Jordan Tomkinson for the patch, from MOODLE_19_STABLE

course/jumpto.php

index 3cea4f459de19960a76da36a9e50830a4c9dc1ab..cf1f91e1d3bc679ac7090ed5a7d4b3e2cbc187c3 100644 (file)
@@ -20,6 +20,8 @@
         redirect(new moodle_url(urldecode($jump)));
     }
 
-    redirect(new moodle_url($_SERVER['HTTP_REFERER']));   // Return to sender, just in case
+    if(isset($_SERVER['HTTP_REFERER'])) {
+        redirect(new moodle_url($_SERVER['HTTP_REFERER']));   // Return to sender, just in case
+    }
 
 ?>