summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes/restfunctions.php
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-08-22 13:43:24 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-08-22 13:43:24 +0200
commit0b97d9697a51f2ddca71b57bd4af57e67f9d0cd4 (patch)
tree0bccb6c52a5e74b1842c263f5355d13ccc07e0b8 /admin/WebConsole/includes/restfunctions.php
parente3b1b1e2a90629eff6d42d0004a8c1b9ae2f1cda (diff)
#834: Setting a default value for some PHP variables to avoid warnings.
Diffstat (limited to 'admin/WebConsole/includes/restfunctions.php')
-rw-r--r--admin/WebConsole/includes/restfunctions.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index 7f710adf..14cace17 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -98,14 +98,18 @@ function clients($case, $ips) {
break;
case 2:
$type = GET;
+ $data = null;
break;
}
$result = common_request(OG_REST_CMD_CLIENTS, $type, $data);
- foreach ($result[OG_REST_PARAM_CLIENTS] as $client) {
- $trama_notificacion = $trama_notificacion.$client[OG_REST_PARAM_ADDR].'/'.
- $client[OG_REST_PARAM_STATE].';';
+ $trama_notificacion = "";
+ if (isset($result[OG_REST_PARAM_CLIENTS])) {
+ foreach ($result[OG_REST_PARAM_CLIENTS] as $client) {
+ $trama_notificacion .= $client[OG_REST_PARAM_ADDR].'/'.
+ $client[OG_REST_PARAM_STATE].';';
+ }
}
return $trama_notificacion;