dachcom-digital / pimcore-i18n

Pimcore - i18n Manager
Other
28 stars 18 forks source link

Disabling CookieRedirector throws Exception #149

Closed GALPR closed 1 year ago

GALPR commented 1 year ago
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no

An exception is thrown when disabling the CookieRedirector service via the following config:

i18n:
  registry:
    redirector:
      cookie:
        enabled: false

"cookie" redirector identifier does not exist

The line that causes this issue is https://github.com/dachcom-digital/pimcore-i18n/blob/fac7a85653a8771203dab56cef8385bc0794addd/src/EventListener/DetectorListener.php#L104

I think this statement could simply be wrapped in if ($this->redirectorRegistry->has('cookie')).

solverat commented 1 year ago

This is a regression of https://github.com/dachcom-digital/pimcore-i18n/pull/147

solverat commented 1 year ago

fixed in 5.0.1