in2code-de / femanager

Modern TYPO3 Frontend User RegistrationTYPO3 Frontend User Registration and Management based on Extbase and Fluid and on TYPO3 8 and the possibility to extend it to your needs. Extension basicly works like sr_feuser_register
https://www.in2code.de/agentur/typo3-extensions/femanager/
48 stars 118 forks source link

TemplateUtility:getTemplateFolders() mixes up paths #86

Closed webloft closed 6 months ago

webloft commented 6 years ago

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.

sbusemann commented 6 years ago

@webloft please specify the file / line you are referring

webloft commented 6 years ago

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.

sbusemann commented 3 years ago

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.