CRM-19413 Fix undefined index test_group when testing mailing
authorJKingsnorth <john@johnkingsnorth.co.uk>
Fri, 16 Dec 2016 10:18:10 +0000 (10:18 +0000)
committerJKingsnorth <john@johnkingsnorth.co.uk>
Fri, 16 Dec 2016 10:18:10 +0000 (10:18 +0000)
CRM/Mailing/BAO/Mailing.php

index 19b7e774f12110ffcdd7e8c85761e83194046e92..ec91ca3acf5a6b8dbb20792c028340f28b929bf9 100644 (file)
@@ -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'],