From 7169ba0700057a5bd4e4df723722277f395365eb Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Sun, 29 Aug 2021 20:37:43 +0100 Subject: [PATCH] Fix deprecated API4 Join --- CRM/Profile/Page/Dynamic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1