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.
Here's the error message:
warning: array_key_exists(): The second argument should be either an array or an object in /home/ateros/public_html/drupal/modules/locale.module on line 344.
So far the error has not reappeared on later accesses after configuring the themes. However, one other thing I noticed, the default theme was set to "example" while only the "Marvin" theme was enabled.
Comments
Comment #1
Gábor HojtsyYou problem relates to the locale.module. I have also experienced this problem. If you drop the locale table of contents, and then access any page, you will get this error. That is because there are no strings to search in (array_key_exists() does not receive an array).
Comment #2
Dries CreditAttribution: Dries commentedI just fixed this problem in the HEAD branch. Marking this report as such.
Comment #3
(not verified) CreditAttribution: commentedAutomatically closed due to inactivity (marked fixed for 14 days).
Comment #4
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedThis bug still happens:
warning: Wrong datatype for first argument in call to array_key_exists in /home/vdst.net/www/htdocs/koeln/modules/locale.module on line 343.
Comment #5
Dries CreditAttribution: Dries commentedI emptied both my
locales
andcache
table but can't reproduce this problem. Looking at the code, I don't see what could cause this warning/error.Comment #6
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedMaybe it isn't the same error as the original one.
I get the error every time I access http://www.vdst.net/koeln/admin/system/modules
I added a dprint_r($string) before the offending line.
I found that image module is the culprit. I close this and will see what needs to be done in image.module.
Comment #7
Kjartan CreditAttribution: Kjartan commentedI'd use debug_backtrace() to find the calling function. My guess is that something is calling t() with a NULL value. There was a bug in PHP 4.1.2 -> 4.3.2 that would cause array_key_exists to fail when the first arg is NULL instead of a string.