the field needs null
authordemeritcowboy <demeritcowboy@hotmail.com>
Fri, 26 Jan 2024 17:15:40 +0000 (12:15 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Fri, 26 Jan 2024 17:15:40 +0000 (12:15 -0500)
CRM/Report/BAO/ReportInstance.php

index ddbfe9fd16366b9000c22c4bf7effe595c4199aa..260f37862097a1be511e55ed855ec08fe031cba2 100644 (file)
@@ -29,6 +29,11 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance implem
       return NULL;
     }
 
+    if (empty($params['grouprole'])) {
+      // an empty array is getting stored as '' but it needs to be null
+      $params['grouprole'] = NULL;
+    }
+
     if (!isset($params['id'])) {
       $params['domain_id'] ??= CRM_Core_Config::domainID();
       // CRM-17256 set created_id on report creation.