the r2lab node has no interface - the node page was broken in that case
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 22 Nov 2024 10:58:51 +0000 (11:58 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 22 Nov 2024 10:58:51 +0000 (11:58 +0100)
planetlab/includes/plc_functions.php

index 97b0bbb..59a5ac6 100644 (file)
@@ -589,6 +589,7 @@ function get_arg ($name,$default=NULL,$method='get') {
 
 //////////////////// number of ...
 function count_english ($objs,$name) {
+  if (is_null($objs)) return 'No ' . $name;
   $count=count($objs);
   if ($count == 0) return 'No ' . $name;
   else if ($count == 1) return 'One ' . $name;
@@ -596,7 +597,7 @@ function count_english ($objs,$name) {
 }
 function count_english_warning ($objs, $name) {
   $x=count_english ($objs,$name);
-  if (count ($objs) == 0) $x=plc_warning_html($x . ' !!');
+  if (is_null($objs) || (count ($objs) == 0)) $x=plc_warning_html($x . ' !!');
   return $x;
 }