array_key_exists problem with wordpress installations

If you have recently upgraded your wordpress and you are getting the following errors:
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /wp-includes/category-template.php on line 176

The simplest way is to open the page “category-template.php” in your wp-includes directory, go down to line 176, which should be
if(array_key_exists($category, $categories))
to
if(array_key_exists('$category', $categories))

This should solve all the problems.