CRM-18675 do extra check before trying to create dashlets to avoid unexpected message
authoreileen <emcnaughton@wikimedia.org>
Mon, 6 Jun 2016 14:45:51 +0000 (08:45 -0600)
committereileen <emcnaughton@wikimedia.org>
Mon, 6 Jun 2016 14:45:57 +0000 (08:45 -0600)
CRM/Core/BAO/Dashboard.php

index 5759ae679d4142bfec17f3a818a4ef0146de525d..51caf401440f8ca26ea7587d02a3aeeb3bd9db2b 100644 (file)
@@ -168,7 +168,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
     $defaultDashlets = array();
     $defaults = array('blog' => 1, 'getting-started' => '0');
     foreach ($defaults as $name => $column) {
-      if (!empty($allDashlets[$name])) {
+      if (!empty($allDashlets[$name]) && !empty($allDashlets[$name]['id'])) {
         $defaultDashlets[$name] = array(
           'dashboard_id' => $allDashlets[$name]['id'],
           'is_active' => 1,