Skip to content
Browse files

MDL-15601 Basic checking to avoid some notices

  • Loading branch information...
1 parent 07dffe4 commit fa2b5a6addb4a83e38a233ae3c2c5d94730542e7 moodler committed
Showing with 9 additions and 2 deletions.
  1. +4 −1 course/lib.php
  2. +5 −1 lib/weblib.php
View
5 course/lib.php
@@ -1341,7 +1341,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) {
View
6 lib/weblib.php
@@ -3453,7 +3453,11 @@ function check_theme_arrows() {
// Also OK in Win 9x/2K/IE 5.x
$THEME->rarrow = '►';
$THEME->larrow = '◄';
- $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.

0 comments on commit fa2b5a6

Please sign in to comment.
Something went wrong with that request. Please try again.