Ensure smarty variables are consistently assigned in report
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 28 Nov 2021 06:26:38 +0000 (19:26 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 28 Nov 2021 06:27:54 +0000 (19:27 +1300)
CRM/Report/Form.php

index 87ff5726008568e43a7429ad0748a785d45f814c..987eea19e1d30b59f9d75d02322c756975665711 100644 (file)
@@ -615,7 +615,9 @@ class CRM_Report_Form extends CRM_Core_Form {
    */
   public function preProcessCommon() {
     $this->_force = CRM_Utils_Request::retrieve('force', 'Boolean');
-
+    // Ensure smarty variables are assigned here since this function is called from
+    // the report api and the main buildForm is not.
+    self::$_template->ensureVariablesAreAssigned($this->expectedSmartyVariables);
     $this->_dashBoardRowCount = CRM_Utils_Request::retrieve('rowCount', 'Integer');
 
     $this->_section = CRM_Utils_Request::retrieve('section', 'Integer');