CRM-14016 - Fix fatal error in Save Copy due to NULL instanceID.
authorDave Greenberg <dave@civicrm.org>
Thu, 9 Jan 2014 00:58:27 +0000 (16:58 -0800)
committerDave Greenberg <dave@civicrm.org>
Thu, 9 Jan 2014 00:58:27 +0000 (16:58 -0800)
----------------------------------------
* CRM-14016: remove report instance from navigation via report settings
  http://issues.civicrm.org/jira/browse/CRM-14016

CRM/Report/Form/Instance.php

index aa0edc3577e362e7cbea00c8844364c7330eb768..93e28866b8d29e9041b41cd454f8d3f724762fe1 100644 (file)
@@ -254,7 +254,7 @@ class CRM_Report_Form_Instance {
     if (CRM_Utils_Array::value('is_navigation', $params)) {
       $params['navigation'] = $form->_navigation;
     }
-    else {
+    else if ($instanceID){
       //delete navigation if exists
       $navId = CRM_Core_DAO::getFieldValue('CRM_Report_DAO_ReportInstance', $instanceID, 'navigation_id', 'id');
       if ($navId) {