backdrop-contrib / i18n

Collection of modules to extend Backdrop CMS multilingual capabilities
https://backdropcms.org/project/i18n
GNU General Public License v2.0
2 stars 5 forks source link

Strange call of language_list() #9

Closed indigoxela closed 4 years ago

indigoxela commented 4 years ago

While I'm starting to dig deeper into module code, I found a weird call of language_list():

https://github.com/backdrop-contrib/i18n/blob/f0c5c7e3a42e9367bcd1554c55c04b235d878e67/i18n.module#L249 return language_list($field, I18N_LANGUAGE_EXTENDED & $mode); This won't work as expected, because the function returns objects, leading to php errors later on.

https://api.backdropcms.org/api/backdrop/core%21includes%21bootstrap.inc/function/language_list/1

I found at least one change record: https://api.backdropcms.org/change-records/languagelist-now-takes-second-parameter-return-array-strings

indigoxela commented 4 years ago

Ah, wait, that's the right change record: https://api.backdropcms.org/change-records/languagelist-simplified-localelanguagelist-removed

Function i18n_language_list() has to be adapted accordingly.

indigoxela commented 4 years ago

Has been fixed via https://github.com/backdrop-contrib/i18n/pull/10/commits/83ac8465b2b50ebc23a5fa3b6314eed39162be05