From 57e2cd31526e5dc28809cf6c30f4532ab555aa0d Mon Sep 17 00:00:00 2001 From: celestora Date: Wed, 19 Jan 2022 18:19:56 +0200 Subject: [PATCH] Fix typo in OpenVKPresenter::setSessionTheme Absence of dollar sign led to condition being always evaluated to true, regardless of arguments passed. Le bug broke behaviour of session themes. This patch fixes #428 --- Web/Presenters/OpenVKPresenter.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Web/Presenters/OpenVKPresenter.php b/Web/Presenters/OpenVKPresenter.php index 380dd3cd..1f2ad294 100755 --- a/Web/Presenters/OpenVKPresenter.php +++ b/Web/Presenters/OpenVKPresenter.php @@ -37,8 +37,10 @@ abstract class OpenVKPresenter extends SimplePresenter protected function setSessionTheme(string $theme, bool $once = false): void { - if(once) Session::i()->set("_tempTheme", $theme); - else Session::i()->set("_sessionTheme", $theme); + if($once) + Session::i()->set("_tempTheme", $theme); + else + Session::i()->set("_sessionTheme", $theme); } protected function flashFail(string $type, string $title, ?string $message = NULL, ?int $code = NULL, bool $json = false): void