Skip to content

Commit e3a145a

Browse files
authored
Merge pull request #8 from jtx/mail_forwarding
check count
2 parents 3568011 + 551e73a commit e3a145a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PleskX/Api/Struct/Mail/Forwards.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@ class Forwards extends \PleskX\Api\Struct
1717

1818
/**
1919
* @param XmlResponse $apiResponse
20+
* @return null|void
2021
* @throws \Exception
2122
*/
2223
public function __construct(XMLResponse $apiResponse)
2324
{
25+
if (!count($apiResponse)) {
26+
return;
27+
}
28+
2429
$line = new \stdClass();
2530
$line->id = $apiResponse->id;
2631
$line->host = $apiResponse->name;

0 commit comments

Comments
 (0)