From: Matthew Wire Date: Sun, 29 Aug 2021 19:37:43 +0000 (+0100) Subject: Fix deprecated API4 Join X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7169ba0700057a5bd4e4df723722277f395365eb;p=civicrm-core.git Fix deprecated API4 Join --- diff --git a/CRM/Profile/Page/Dynamic.php b/CRM/Profile/Page/Dynamic.php index 7ce7eeef62..2e05630f61 100644 --- a/CRM/Profile/Page/Dynamic.php +++ b/CRM/Profile/Page/Dynamic.php @@ -446,7 +446,7 @@ class CRM_Profile_Page_Dynamic extends CRM_Core_Page { if (!$email) { return ''; } - $emailID = Email::get()->setOrderBy(['is_primary' => 'DESC'])->setWhere([['contact_id', '=', $this->_id], ['email', '=', $email], ['on_hold', '=', FALSE], ['contact.is_deceased', '=', FALSE], ['contact.is_deleted', '=', FALSE], ['contact.do_not_email', '=', FALSE]])->execute()->first()['id']; + $emailID = Email::get()->setOrderBy(['is_primary' => 'DESC'])->setWhere([['contact_id', '=', $this->_id], ['email', '=', $email], ['on_hold', '=', FALSE], ['contact_id.is_deceased', '=', FALSE], ['contact_id.is_deleted', '=', FALSE], ['contact_id.do_not_email', '=', FALSE]])->execute()->first()['id']; if (!$emailID) { return $email; }