Template engine tried to recreate himself when HTTP error appears
This commit is contained in:
veselcraft 2021-01-24 14:47:32 +03:00
parent a43eda027b
commit 65da4abe33

View file

@ -74,8 +74,7 @@ abstract class SimplePresenter implements IPresenter
$ext = explode("\\", get_class($this))[0];
$path = CHANDLER_EXTENSIONS_ENABLED . "/$ext/Web/Presenters/templates/" . $this->errorTemplate . ".xml";
$latte = new TemplatingEngine;
$latte->setTempDirectory(CHANDLER_ROOT . "/tmp/cache/templates");
$latte = $this->getTemplatingEngine();
$latte->render($path, array_merge_recursive([
"code" => $code,
"desc" => $desc,