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

Gábor Hojtsy’s picture

Title: Error message received when first accessing theme configuration » Error message displayed first time when locale module enabled
Component: theme system » locale.module

You 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).

Dries’s picture

Assigned: Unassigned » Dries

I just fixed this problem in the HEAD branch. Marking this report as such.

Anonymous’s picture

Automatically closed due to inactivity (marked fixed for 14 days).

killes@www.drop.org’s picture

This 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.

Dries’s picture

I emptied both my locales and cache table but can't reproduce this problem. Looking at the code, I don't see what could cause this warning/error.

killes@www.drop.org’s picture

Maybe 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.

Kjartan’s picture

Assigned: Dries » Kjartan

I'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.