Smartyを3.1.27から3.1.28アプデにしたらFatal error: Uncaught --> Smarty: Unable to load template file 〇〇.tpl'' <-- が出た話
Smartyを3.1.27から3.1.28アプデにしたら
Fatal error: Uncaught --> Smarty: Unable to load template file 'index.tpl' <--
が出て困りました。
原因
クラス変数に値を直接代入していた。
$smarty->template_dir = '/templates'; $smarty->compile_dir = '/templates_c';
解決策
$smarty->setCompileDir('/templates_c'); $smarty->setTemplateDir('/templates');