diff --git a/doc/example/FroxlorAPI.php b/doc/example/FroxlorAPI.php index 8bcb742d..9b2ef050 100644 --- a/doc/example/FroxlorAPI.php +++ b/doc/example/FroxlorAPI.php @@ -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; }