diff --git a/changelog/67_UNRELEASED_xxxx-xx-xx.md b/changelog/67_UNRELEASED_xxxx-xx-xx.md index e9a29586..e6d7183a 100644 --- a/changelog/67_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/67_UNRELEASED_xxxx-xx-xx.md @@ -48,7 +48,7 @@ ### General -- xxx +- Fixed an server error (on every page) when not having any quantity unit ### API diff --git a/services/LocalizationService.php b/services/LocalizationService.php index 76d9f1b3..c758303d 100644 --- a/services/LocalizationService.php +++ b/services/LocalizationService.php @@ -197,6 +197,8 @@ class LocalizationService $this->Translator = new Translator(); $this->Translator->loadTranslations($this->Po); + $this->PoQu = new Translations(); + $quantityUnits = null; try { @@ -209,7 +211,6 @@ class LocalizationService if ($quantityUnits !== null) { - $this->PoQu = new Translations(); $this->PoQu->setHeader(Translations::HEADER_PLURAL, $this->Po->getHeader(Translations::HEADER_PLURAL)); foreach ($quantityUnits as $quantityUnit)