Merge pull request #23015 from ginkgomzd/php8-unsupported-operand
[civicrm-core.git] / CRM / Contact / Page / View / UserDashBoard.php
index ca3d246e7287cf10409fa097e684a36c2342fcb5..9cb559bf47ce63e72a3f93aa367f7a4c5ed958eb 100644 (file)
@@ -167,6 +167,12 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
     }
 
     usort($dashboardElements, ['CRM_Utils_Sort', 'cmpFunc']);
+    foreach ($dashboardElements as $index => $dashboardElement) {
+      // Ensure property is set to avoid smarty notices
+      if (!array_key_exists('class', $dashboardElement)) {
+        $dashboardElements[$index]['class'] = NULL;
+      }
+    }
     $this->assign('dashboardElements', $dashboardElements);
 
     if (!empty($dashboardOptions['Groups'])) {