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]; $ext = explode("\\", get_class($this))[0];
$path = CHANDLER_EXTENSIONS_ENABLED . "/$ext/Web/Presenters/templates/" . $this->errorTemplate . ".xml"; $path = CHANDLER_EXTENSIONS_ENABLED . "/$ext/Web/Presenters/templates/" . $this->errorTemplate . ".xml";
$latte = new TemplatingEngine; $latte = $this->getTemplatingEngine();
$latte->setTempDirectory(CHANDLER_ROOT . "/tmp/cache/templates");
$latte->render($path, array_merge_recursive([ $latte->render($path, array_merge_recursive([
"code" => $code, "code" => $code,
"desc" => $desc, "desc" => $desc,