diff --git a/api.php b/api.php index dbe26a2..8920d9f 100644 --- a/api.php +++ b/api.php @@ -172,7 +172,9 @@ if ($settings != null || $settings != ""){ // Issuing command if ($command == "null"){ - $deviceCommand = DeviceManager::getDeviceByToken($token)["command"]; + $device = DeviceManager::getDeviceByToken($token); + $deviceId = $device['device_id']; + $deviceCommand = $device["command"]; if ($deviceCommand != '' || $deviceCommand != null) { $command = $deviceCommand;