]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed notice.
authorvyshane <vyshane>
Wed, 10 Jan 2007 06:11:31 +0000 (06:11 +0000)
committervyshane <vyshane>
Wed, 10 Jan 2007 06:11:31 +0000 (06:11 +0000)
blocks/mnet_hosts/block_mnet_hosts.php

index 1ef60b1746df1cda78a6c1b7f1a9b1ba6a8e7e67..63a8ba19794a34e7fc8bb33679343f140f7dcea2 100644 (file)
@@ -55,14 +55,16 @@ class block_mnet_hosts extends block_list {
         $icon  = "<img src=\"$CFG->pixpath/i/mnethost.png\"".
             " class=\"icon\" alt=\"".get_string('server', 'block_mnet_hosts')."\" />";
 
-        foreach ($hosts as $host) {
-            $this->content->icons[]=$icon;
-            $this->content->items[]="<a title=\"" .s($host->name).
-                "\" href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$host->id}\">" . s($host->name) ."</a>";
+        if ($hosts) {
+            foreach ($hosts as $host) {
+                $this->content->icons[]=$icon;
+                $this->content->items[]="<a title=\"" .s($host->name).
+                    "\" href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$host->id}\">" . s($host->name) ."</a>";
+            }
         }
 
         return $this->content;
     }
 }
 
-?>
+?>
\ No newline at end of file