b13 / menus

TYPO3 Extension for creating fast menus in a fast fashion
GNU General Public License v2.0
54 stars 21 forks source link

excludeLanguages with IDs fails due to strict typing #70

Closed maddy2101 closed 2 years ago

maddy2101 commented 2 years ago

good morning, I am using the LanguageMenuProcessor and exclude some languages via their uid (Field Two Letter ISO Code[iso-639-1] can't be used because it is not unique).

In LanguageMenuCompiler line 42 the in_array condition is strict typed, but due to stdWrap handling the uids are given as strings, which makes the comparison fail.

Removing the strict parameter already solves the issue.

Would you please fix the issue (I can also provide a PR if wanted, just let me know) and release a new version? Thank you so much for all the work.

bmack commented 2 years ago

I think we need a (int) cast here: https://github.com/b13/menus/blob/master/Classes/Compiler/LanguageMenuCompiler.php#L44

maddy2101 commented 2 years ago

I tested the provided solution and it works for me.

maddy2101 commented 2 years ago

Please, could you consider merging and releasing a new version? I'd like to avoid composer patching my instance if possible.