WordPress.org

Ready to get started?Download WordPress

Forums

Warning: array_key_exists() error after upgrade (6 posts)

  1. svenke
    Member
    Posted 6 years ago #

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

    after the upgrade to version 2.3.1 i'm getting this error twice on the index page of my blog.

    In the category template file i don't find anything that refers to array_key_exists

    suggestions ?

  2. svenke
    Member
    Posted 6 years ago #

    i found the reference, but how to solve

    function in_category( $category ) { // Check if the current post is in the given category
    global $post, $blog_id;

    $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;
    }

  3. kiraslye
    Member
    Posted 6 years ago #

    if(array_key_exists($category, $categories))

    it's that line, I have the same error! Someone please help, I don't know what it means to put a string or integer?

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

  4. kiraslye
    Member
    Posted 6 years ago #

    Anyone able to help with this?

  5. shlinklincoln
    Member
    Posted 6 years ago #

    bump

  6. mikesz
    Member
    Posted 6 years ago #

    This problem has a solution:

    http://commonsense360.com/?p=14

    From the MistyLook support site:

    "You are using WordPress 2.3.1 and MistyLook 3.2. They don't cooperate together.
    Please, download the newest version of ML (3.5) which works with new features WP 2.3.1 offers."

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.