Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I’m having issues with this code from the start of _addresses_province_ajax:
// Keep the same language between calls so that t() calls work as expected
if (!empty($_GET['language'])) {
$languages = language_list(); // get all languages
if (isset($languages[$_GET['language']])) {
$language = $languages[$_GET['language']];
}
}
If I dump the $_GET['language'] variable, it is an array, like this array('da', 'da');
.
This is rather odd, but I haven't seen any other modules futzing with $_GET['langauge']. Any ideas?
Comments
Comment #1
AlexisWilke CreditAttribution: AlexisWilke commentedThe $_GET['language'] variable is used by the Core translation module.
From what I can tell, the usage in addresses is similar, except that it sets the $language global variable and that I think is wrong... I did not write that code and am unsure why it's there. It seems to me that it isn't necessary.
Thank you.
Alexis