From 93311f1857f4b0b80a64242f721217a9817a8a2a Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Mon, 16 Dec 2024 22:47:43 +0700 Subject: [PATCH] `getGlobal` to `getGlobals()` --- author/project/system/views/templater.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/author/project/system/views/templater.php b/author/project/system/views/templater.php index bce20a6..32d523a 100755 --- a/author/project/system/views/templater.php +++ b/author/project/system/views/templater.php @@ -78,14 +78,15 @@ final class templater extends controller implements array_access * Render the HTML-document * * @param string $$file Related path to a HTML-document - * @param ?array $$variables Registry of variables to push into registry of global variables + * @param array $$variables Registry of variables to push into registry of global variables * * @return ?string HTML-document */ - public function render(string $$file, ?array $$variables = null): ?string + public function render(string $$file, array $$variables = []): ?string { // Generation and exit (success) - return $$this->twig->render('themes' . DIRECTORY_SEPARATOR . $$this->twig->getGlobal('theme') . DIRECTORY_SEPARATOR . $$file, $$variables + $$this->variables); + return $$this->twig->render('themes' . DIRECTORY_SEPARATOR . $$this->twig->getGlobals()['theme'] . DIRECTORY_SEPARATOR . $$file, $$variables + $$this->variables); + } /**