From cd92192cb8e4c0520e6c5039951fc372e89c604f Mon Sep 17 00:00:00 2001 From: malle-pietje Date: Wed, 10 Oct 2018 10:14:00 +0200 Subject: [PATCH] API client class v1.1.34 - added spaces throughout Client.php following PSR-2 guidelines - changed checks to prevent 0 (zero) values from being submitted to the API for routes where this can have negative side effects --- src/Client.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Client.php b/src/Client.php index e2a9050..01c7006 100755 --- a/src/Client.php +++ b/src/Client.php @@ -212,15 +212,15 @@ class Client /** * if we have received values for up/down/MBytes/ap_mac we append them to the payload array to be submitted */ - if (isset($up)) { + if (!empty($up)) { $json['up'] = intval($up); } - if (isset($down)) { + if (!empty($down)) { $json['down'] = intval($down); } - if (isset($MBytes)) { + if (!empty($MBytes)) { $json['bytes'] = intval($MBytes); } @@ -1907,15 +1907,15 @@ class Client $json['note'] = trim($note); } - if (isset($up)) { + if (!empty($up)) { $json['up'] = intval($up); } - if (isset($down)) { + if (!empty($down)) { $json['down'] = intval($down); } - if (isset($MBytes)) { + if (!empty($MBytes)) { $json['bytes'] = intval($MBytes); }