bugfix: the slice page was broken when nobody is in slice
[plewww.git] / planetlab / nodes / slivers.php
index 62e46de..d146c08 100644 (file)
@@ -20,7 +20,7 @@ require_once 'form.php';
 
 
 // if slice and node ids are passed display slivers and tags
-if( $_GET['slice_id'] && $_GET['node_id'] ) {
+if( get_array($_GET, 'slice_id') && get_array($_GET, 'node_id') ) {
     $slice_id = $_GET['slice_id'];
     $node_id = $_GET['node_id'];
 
@@ -60,7 +60,7 @@ if( $_GET['slice_id'] && $_GET['node_id'] ) {
     $form->start();
     $table->start();
 
-    foreach ($tags as $tag) {
+    if ($tags) foreach ($tags as $tag) {
         $table->row_start();
         $table->cell($tag['tagname']);
         $table->cell($tag['value']);