Fix Undefined index: params in CRM_Event_BAO_Event::buildCustomProfile()
authorWouter H <wouter@ctrl.be>
Thu, 16 Aug 2018 08:59:40 +0000 (10:59 +0200)
committerGitHub <noreply@github.com>
Thu, 16 Aug 2018 08:59:40 +0000 (10:59 +0200)
Added check to suppress notice: Undefined index: params in CRM_Event_BAO_Event::buildCustomProfile() which comes after returning to site from an online payment provider.

CRM/Event/BAO/Event.php

index 203c47f4c20b5b2fa6dca2cc93328c5af9812033..c525d41276f97cebe308c50df2b90705c2e9d657 100644 (file)
@@ -1826,7 +1826,10 @@ WHERE  id = $cfID
         $title = $groupTitles = array();
         foreach ($additionalIDs as $pId => $cId) {
           //get the params submitted by participant.
-          $participantParams = CRM_Utils_Array::value($pId, $values['params'], array());
+          $participantParams = NULL;
+          if(isset($values['params'])) {
+            $participantParams = CRM_Utils_Array::value($pId, $values['params'], array());
+          }
 
           list($profilePre, $groupTitles) = self::buildCustomDisplay($preProfileID,
             'additionalCustomPre',