return empty array in FroxlorAPI.php example class if last call was unsuccessful, fixes #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -148,6 +148,11 @@ class FroxlorAPI
|
||||
*/
|
||||
public function getLastResponse(): array
|
||||
{
|
||||
if (!empty($this->getLastError())) {
|
||||
// nothing is returned when the last call
|
||||
// was not successful
|
||||
return [];
|
||||
}
|
||||
return $this->last_body;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user