dev/core/issues/743, Donot join relationship table when not required
authorPradeep Nayak <pradpnayak@gmail.com>
Thu, 18 Apr 2019 09:25:44 +0000 (10:25 +0100)
committerPradeep Nayak <pradpnayak@gmail.com>
Thu, 18 Apr 2019 10:50:42 +0000 (11:50 +0100)
CRM/Report/Form/Case/Summary.php

index ee0bc8150ba404815c8dcb13206c934c88c7ed7d..1db23629ce08d7622e51cdf22a5ba0e96f4cca48 100644 (file)
@@ -278,7 +278,10 @@ class CRM_Report_Form_Case_Summary extends CRM_Report_Form {
     $ccc = $this->_aliases['civicrm_case_contact'];
 
     foreach ($this->_columns['civicrm_relationship']['filters'] as $fieldName => $field) {
-      if (!empty($this->_params[$fieldName . '_op']) && isset($this->_params[$fieldName . '_value'])) {
+      if (!empty($this->_params[$fieldName . '_op'])
+        && array_key_exists("{$fieldName}_value", $this->_params)
+        && !CRM_Utils_System::isNull($this->_params["{$fieldName}_value"])
+      ) {
         $this->_relField = TRUE;
         break;
       }