From 2ad3d96bf44836745ed45c198d9e2ea11a2af89f Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Fri, 5 Apr 2024 17:14:43 -0400 Subject: [PATCH] avoid deprecation notice if header is null --- CRM/Report/Utils/Report.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Report/Utils/Report.php b/CRM/Report/Utils/Report.php index dc95ffd95b2b..7a86860d207b 100644 --- a/CRM/Report/Utils/Report.php +++ b/CRM/Report/Utils/Report.php @@ -236,7 +236,8 @@ public static function makeCsv(&$form, &$rows) { // Replace internal header names with friendly ones, where available. foreach ($columnHeaders as $header) { if (isset($form->_columnHeaders[$header])) { - $headers[] = '"' . html_entity_decode(strip_tags($form->_columnHeaders[$header]['title'])) . '"'; + $title = $form->_columnHeaders[$header]['title'] ?? ''; + $headers[] = '"' . html_entity_decode(strip_tags($title)) . '"'; } } // Add the headers.