Merge pull request #8494 from kcristiano/CRM-18221
[civicrm-core.git] / CRM / Core / BAO / Dashboard.php
index c8df7cbdc738afb5735363efd24ddb962cc289af..51caf401440f8ca26ea7587d02a3aeeb3bd9db2b 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
  */
 
 /**
@@ -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,