]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15601 Merged basic checking to avoid some notices
authormoodler <moodler>
Thu, 10 Jul 2008 08:50:43 +0000 (08:50 +0000)
committermoodler <moodler>
Thu, 10 Jul 2008 08:50:43 +0000 (08:50 +0000)
course/lib.php
lib/weblib.php

index efdf44354560eeaf51fbfce2462d0aa51189cd8e..b4ca8e5c8f1917a6c691111b683f1343aa7afe43 100644 (file)
@@ -1363,7 +1363,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
                 print_spacer(12, 20 * $mod->indent, false);
             }
 
-            $extra = $modinfo->cms[$modnumber]->extra;
+            $extra = '';
+            if (!empty($modinfo->cms[$modnumber]->extra)) {
+                $extra = $modinfo->cms[$modnumber]->extra;
+            }
 
             if ($mod->modname == "label") {
                 if (!$mod->visible) {
index c5df242fe600ad6c495640f64e746241fd76b95b..fe732d4f9dd200363f063ca2e74c2a2b24f9babc 100644 (file)
@@ -3366,7 +3366,11 @@ function check_theme_arrows() {
         // Also OK in Win 9x/2K/IE 5.x
         $THEME->rarrow = '&#x25BA;';
         $THEME->larrow = '&#x25C4;';
-        $uagent = $_SERVER['HTTP_USER_AGENT'];
+        if (empty($_SERVER['HTTP_USER_AGENT'])) {
+            $uagent = '';
+        } else {
+            $uagent = $_SERVER['HTTP_USER_AGENT'];
+        }
         if (false !== strpos($uagent, 'Opera')
             || false !== strpos($uagent, 'Mac')) {
             // Looks good in Win XP/Mac/Opera 8/9, Mac/Firefox 2, Camino, Safari.