Was trying to track another error and found the get_languages routine in C4::Templates was giving lots of not defined errors in the logs. Looking closer found that the routine has obviously grown by accretion and was a) not always too clear in its intention b) was carelessly using undefined values c) was actually passing undef to other routines so they could in turn log warnings and return undef - only a few cycles wasted but it is a routine that could be called freqently.
Have refactored the routine to address these concerns
Created attachment 8775 [details] [review]
Created attachment 8811 [details] [review]
Having put my hands recently in this part of Koha code, I can confirm
that this patch fix log warnings, and add clarity and conciseness.
QA comment: small patches, nothing to spot. passed QA
I've tested language change still works after applying the patch by switching from en to fr-FR and then back to en
This patch will be included in 3.6.5.