From 048387efd96a2a8c1000bb2bdeef2e5afefb6e2b Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 9 Nov 2017 10:44:09 +1300 Subject: [PATCH] CRM-21412 Do not give fatal error on report when no fields selected --- CRM/Report/Form.php | 5 +++++ 1 file changed, 5 insertions(+) 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) . " "; } -- 2.25.1