Closed webloft closed 6 months ago
@webloft please specify the file / line you are referring
femanager/Classes/Utility/TemplateUtility.php:49 and may be other occurrences of array_values(). femanager/Classes/Utility/TemplateUtility.php:80 select last element with calling end()
Same problem in powermail.
A simple ksort does not solve the issue. At the moment I rate this as a minor issue, as no one else reported it since then.
Do not use array_values() which will not preverse any ordering of the paths. The paths returned by Extbase may be in different order, depending on typoscript execution.
A
ksort($templatePaths);
before array_values() also may fix the issue - but I will not make a pull request since I do not how your implementation logic. getTemplatePath() says "Only the first existing file/path will be returned." but in fact it will select the last element through the end() call.