From d72fd6950b546a41a7fa7fafa013297b7b85f6ce Mon Sep 17 00:00:00 2001 From: vyshane Date: Wed, 10 Jan 2007 06:11:31 +0000 Subject: [PATCH] Fixed notice. --- blocks/mnet_hosts/block_mnet_hosts.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 -- 2.39.5