From: JKingsnorth Date: Fri, 16 Dec 2016 10:18:10 +0000 (+0000) Subject: CRM-19413 Fix undefined index test_group when testing mailing X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4ba295a40f510f740f686c23f89153379f5a9c34;p=civicrm-core.git CRM-19413 Fix undefined index test_group when testing mailing --- diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 19b7e774f1..ec91ca3acf 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -926,7 +926,7 @@ ORDER BY {$orderBy} * @return void */ public function getTestRecipients($testParams) { - if (array_key_exists($testParams['test_group'], CRM_Core_PseudoConstant::group())) { + if (!empty($testParams['test_group']) && array_key_exists($testParams['test_group'], CRM_Core_PseudoConstant::group())) { $contacts = civicrm_api('contact', 'get', array( 'version' => 3, 'group' => $testParams['test_group'],