mirror of
https://github.com/Art-of-WiFi/UniFi-API-client.git
synced 2024-11-24 19:20:20 +01:00
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
This commit is contained in:
parent
7c6cd4eb85
commit
cd92192cb8
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user