warning: Illegal offset type in isset or empty I am running drupal 6 and I get this warning on every page.

warning: Illegal offset type in isset or empty in /var/www/my-website/includes/common.inc on line 915.


And this is what I have from lines 914 to 917 in common.inc file

// Custom strings work for English too, even if locale module is disabled.
if (isset($custom_strings[$langcode][$string])) {    /* Line: 915 */
  $string = $custom_strings[$langcode][$string];
}


What could be the possible reasons for the warning and how to get rid of it? Any help is appreciated. Thanks.

Edit:
   This warning appears only for anonymous users and it is not visible for authenticated users.
I have fixed the problem. I think this will help you. For me it works perfectly:

BEFORE:

// Custom strings work for English too, even if locale module is disabled.
if (isset($custom_strings[$langcode][$string])) {
  $string = $custom_strings[$langcode][$string];
}


AFTER:

// Custom strings work for English too, even if locale module is disabled.
if ($custom_strings[$langcode] &amp;&amp; isset($custom_strings[$langcode][$string])) {
  $string = $custom_strings[$langcode][$string];
}