Fixing the array_key_exists WordPress Warning/Error – The first argument should be either a string or an integer in
February 7th, 2008 | Posted by in Tech/Web | Wordpress
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.
thanks a lot !!
Thanks!
Pingback: Bätschman on Tour - www.Baetschman.de » Blog Archive » Wordpress Upgrate 2.2 auf 2.3.3
Hello!
Very Interesting post! Thank you for such interesting resource!
PS: Sorry for my bad english, I’v just started to learn this language
See you!
Your, Raiul Baztepo
thanks lot