Hi.

I get this error when I have set Hide administration language on user form = enabled in admin/settings/language/admin_language

warning: array_keys() [function.array-keys]: The first argument should be an array in (...) sites/all/modules/admin_language/admin_language.module on line 196.
warning: array_shift() [function.array-shift]: The argument should be an array in (...) sites/all/modules/admin_language/admin_language.module on line 197.

Comments

gumol’s picture

Important adnotation: the warning appears only in user profile page for example user/*/edit/my_profile_group

Neo Mithrandil’s picture

I hit the same problem. I quickly solved it on my website by adding a check for "isset($form['locale'])" as follows, but I'm not sure it's fully correct:

function admin_language_form_user_profile_form_alter(&$form, &$form_state) {
  if (variable_get('admin_language_hide_user', 0) && !user_access('use all enabled languages')) {
    if (isset($form['locale'])) {
      $language = variable_get('admin_language_default', 'en');
      [...]
    }
  }
}
liam morland’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is no longer supported. If this issue is relevant for Drupal 7, please re-open and update the version.