Skip to content

Commit

Permalink
fix: do not traverse empty contact object.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Feb 22, 2024
1 parent 9d4bc93 commit ab2cb2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/php/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ public function getContacts()
{
$contacts = $this->getMeta('contact');

if(!is_array($contacts)) {
return [];
}

array_walk($contacts, function (&$contact) {
$contact = (object)$contact;
});
Expand Down

0 comments on commit ab2cb2e

Please sign in to comment.