Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /your-sitepath/wp-includes/category-template.php on line 176

This problems stems from line 176 as stated above – some people have said that updating their wordpress theme worked, however, a simple change to line 176 seems to work perfectly.

Change line 176 from:

if(array_key_exists($category, $categories))

To

if(array_key_exists('$category', $categories))

Don’t see the difference? Just add single quotes around the first $category variable. Make sure they are not the curly single quotes.

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

5 Responses



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>