string integer error
-
I am receiving this error
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/dhs303/public_html/wp-includes/category-template.php on line 176
Here is the code.
$categories = get_object_term_cache($post->ID, ‘category’);
if ( false === $categories )
$categories = wp_get_object_terms($post->ID, ‘category’);
if(array_key_exists($category, $categories))
return true;
else
return false;Can anyone tell me what the problem is
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘string integer error’ is closed to new replies.