Merge pull request #21575 from agh1/5.42.0-releasenotes-initial
[civicrm-core.git] / CRM / Core / Smarty.php
index 1dbfe01434b132f6a5a1cd320f6c490142e3549e..5c3afb207f5a759cf869414eaf8a57ae4d8446af 100644 (file)
@@ -147,6 +147,10 @@ class CRM_Core_Smarty extends Smarty {
     $this->load_filter('pre', 'resetExtScope');
 
     $this->assign('crmPermissions', new CRM_Core_Smarty_Permissions());
+
+    if ($config->debug) {
+      $this->error_reporting = E_ALL;
+    }
   }
 
   /**
@@ -154,6 +158,8 @@ class CRM_Core_Smarty extends Smarty {
    *
    * Method providing static instance of SmartTemplate, as
    * in Singleton pattern.
+   *
+   * @return \CRM_Core_Smarty
    */
   public static function &singleton() {
     if (!isset(self::$_singleton)) {