}
// Special permissions check for private instance if it's not the current contact instance
- if (CRM_Report_BAO_ReportInstance::reportIsPrivate($this->_id) &&
- !CRM_Report_BAO_ReportInstance::contactIsOwner($this->_id)) {
+ if (!$this->_id ||
+ (CRM_Report_BAO_ReportInstance::reportIsPrivate($this->_id) &&
+ !CRM_Report_BAO_ReportInstance::contactIsOwner($this->_id))) {
if (!CRM_Core_Permission::check('access all private reports')) {
$this->_instanceForm = FALSE;
$this->assign('criteriaForm', FALSE);