From: eileen Date: Wed, 8 Nov 2017 21:44:09 +0000 (+1300) Subject: CRM-21412 Do not give fatal error on report when no fields selected X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=048387efd96a2a8c1000bb2bdeef2e5afefb6e2b;p=civicrm-core.git CRM-21412 Do not give fatal error on report when no fields selected --- diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 19d61a1143..295796c424 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -2396,6 +2396,11 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND } } + if (empty($select)) { + // CRM-21412 Do not give fatal error on report when no fields selected + $select = array(1); + } + $this->_selectClauses = $select; $this->_select = "SELECT " . implode(', ', $select) . " "; }