WordPress.org

Ready to get started?Download WordPress

Forums

Class Blogs
ClassBlogs error: Warning: array_key_exists() (3 posts)

  1. AardvarkGirl
    Member
    Posted 1 year ago #

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object (website path here)/wp-content/plugins/class-blogs/ClassBlogs/Utils.php on line 113

    http://wordpress.org/extend/plugins/class-blogs/

  2. rCampbell
    Member
    Posted 1 year ago #

    Not sure if you figured this out. I've been trying to figure this out for a bit as it has forced my students to use QuickPost in the Dashboard of their sites.

    I changed
    if ( property_exists( $wp_query, 'query' ) && array_key_exists( 'page_id', $wp_query->query ) ) {

    to
    if ( property_exists( $wp_query, 'query' ) && array_key_exists( 'page_id', $wp_query ) ) {

    I think it works now as the error is no longer showing up. I also noted that this only happens in IE, not in Chrome.

  3. oberlincilc
    Member
    Plugin Author

    Posted 1 year ago #

    The code that rCampbell is posted is not too far off, as it no longer gives the plugin the chance to look for an array key in something that's not an array. However, it also bypasses the check for the page_id variable entirely, which will make the plugin perform in unexpected ways.

    I just posted version 0.5.1 of the plugin, though, and that contains modified code that should prevent this error message from coming up again. If you have a chance, try out the new version and let me know if that solves the problem. If not, I'll have another go at fixing this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic