error_reporting = $smartyErrorReportingLevel; // Ensure that Smarty respects the same level of report as Tiki (pref smarty_notice_reporting is already handled above) if (php_sapi_name() != 'cli') { // This handler collects errors to display at the bottom of the general template, so don't use it in CLI, otherwise errors would be lost. if ($previousErrorHandler = set_error_handler('tiki_error_handling', $errorReportingLevel)) { TikiLib::lib('errortracking')->setErrorHandler($previousErrorHandler); }; } error_reporting($errorReportingLevel); if ($prefs['log_sql'] == 'y' && $api_tiki == 'adodb') { $dbTiki->LogSQL(); global $ADODB_PERF_MIN; $ADODB_PERF_MIN = $prefs['log_sql_perf_min']; } // TODO: check this only once per session or only if a feature ask for it TikiSetup::check($tikidomain); if (! isset($phpErrors)) { $phpErrors = []; } $smarty->assign_by_ref('phpErrors', $phpErrors);