Stop php warning "Invalid foreach argument"

This commit is contained in:
Hadi Nategh 2019-07-18 12:34:12 +02:00
parent 86f4886f1f
commit c1fe53eccd

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']]))
{