From 5b8e26b5d5601fa0c62c07a9fb4b9d8526d08416 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 1 Mar 2019 11:28:00 +1100 Subject: [PATCH 1/2] Fix up e-notice error when using a user from email address same issue as dev/core#644 --- CRM/Contribute/Form/Task/PDF.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Task/PDF.php b/CRM/Contribute/Form/Task/PDF.php index 2ded1e46f365..f29751970c0a 100644 --- a/CRM/Contribute/Form/Task/PDF.php +++ b/CRM/Contribute/Form/Task/PDF.php @@ -200,8 +200,12 @@ public function postProcess() { $values = array(); if (isset($params['from_email_address']) && !$elements['createPdf']) { + // If a logged in user from email is used rather than a domain wide from email address + // the from_email_address params key will be numerical and we need to convert it to be + // in normal from email format + $from = CRM_Utils_Mail::formatFromAddress($params['from_email_address']); // CRM-19129 Allow useres the choice of From Email to send the receipt from. - $fromDetails = explode(' <', $params['from_email_address']); + $fromDetails = explode(' <', $from); $input['receipt_from_email'] = substr(trim($fromDetails[1]), 0, -1); $input['receipt_from_name'] = str_replace('"', '', $fromDetails[0]); } From 3845929507f7d0bdfcb8db3e906471004e4bbffb Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Fri, 1 Mar 2019 08:09:31 +0530 Subject: [PATCH 2/2] dev/core#768 - Fix fatal error on group search --- CRM/Contact/BAO/Query.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index cdd3f4761808..ac81fec5bff4 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -3013,10 +3013,13 @@ public function group($values) { if (count($regularGroupIDs) > 1) { $op = strpos($op, 'IN') ? $op : ($op == '!=') ? 'NOT IN' : 'IN'; } - $groupIds = CRM_Utils_Type::validate( - implode(',', (array) $regularGroupIDs), - 'CommaSeparatedIntegers' - ); + $groupIds = ''; + if (!empty($regularGroupIDs)) { + $groupIds = CRM_Utils_Type::validate( + implode(',', (array) $regularGroupIDs), + 'CommaSeparatedIntegers' + ); + } $gcTable = "`civicrm_group_contact-" . uniqid() . "`"; $joinClause = array("contact_a.id = {$gcTable}.contact_id");