Stop php warning "Invalid foreach argument"

This commit is contained in:
Hadi Nategh 2019-07-18 12:34:12 +02:00
parent dd32515d74
commit 72bd27587c

View File

@ -219,7 +219,7 @@ class addressbook_bo extends Api\Contacts
if (!$criteria) return 0;
$updated = 0;
foreach($this->search($criteria, false, '', '', '', false, 'OR') as $contact)
foreach((array)$this->search($criteria, false, '', '', '', false, 'OR') as $contact)
{
if ($contact['account_id'] && isset($keys[$contact['account_id']]))
{