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
This commit is contained in:
celestora 2022-01-19 18:19:56 +02:00 committed by GitHub
parent f4d6b2bc14
commit 57e2cd3152
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,8 +37,10 @@ abstract class OpenVKPresenter extends SimplePresenter
protected function setSessionTheme(string $theme, bool $once = false): void protected function setSessionTheme(string $theme, bool $once = false): void
{ {
if(once) Session::i()->set("_tempTheme", $theme); if($once)
else Session::i()->set("_sessionTheme", $theme); 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 protected function flashFail(string $type, string $title, ?string $message = NULL, ?int $code = NULL, bool $json = false): void