Skip to content

Commit df022a2

Browse files
authored
Merge pull request #9 from jtx/mail_get_fix
Don't add null to the get list
2 parents e3a145a + 15be539 commit df022a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PleskX/Api/Operator/Mail.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public function get(int $siteId): array
4848

4949
$forwards = [];
5050
foreach ($response->mail->get_info->result as $forwardInfo) {
51-
$forwards[] = new Struct\Forwards($forwardInfo->mailname);
51+
if (isset($forwardInfo->mailname)) {
52+
$forwards[] = new Struct\Forwards($forwardInfo->mailname);
53+
}
5254
}
5355

5456
return $forwards;

0 commit comments

Comments
 (0)