From: vyshane Date: Wed, 10 Jan 2007 06:11:31 +0000 (+0000) Subject: Fixed notice. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d72fd6950b546a41a7fa7fafa013297b7b85f6ce;p=moodle.git Fixed notice. --- diff --git a/blocks/mnet_hosts/block_mnet_hosts.php b/blocks/mnet_hosts/block_mnet_hosts.php index 1ef60b1746..63a8ba1979 100644 --- a/blocks/mnet_hosts/block_mnet_hosts.php +++ b/blocks/mnet_hosts/block_mnet_hosts.php @@ -55,14 +55,16 @@ class block_mnet_hosts extends block_list { $icon = "pixpath/i/mnethost.png\"". " class=\"icon\" alt=\"".get_string('server', 'block_mnet_hosts')."\" />"; - foreach ($hosts as $host) { - $this->content->icons[]=$icon; - $this->content->items[]="name). - "\" href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$host->id}\">" . s($host->name) .""; + if ($hosts) { + foreach ($hosts as $host) { + $this->content->icons[]=$icon; + $this->content->items[]="name). + "\" href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$host->id}\">" . s($host->name) .""; + } } return $this->content; } } -?> +?> \ No newline at end of file