• Hi guys. I noticed this error at the bottom of one of my clients’ sites at the bottom of the page (probably coming from wp_footer) after the latest plugin update a few days ago.
    The line in question is part of the w3_detect_post_id() function, defined in the file inc/define.php, and reads:

    return $posts[0]->ID;

    Since $posts holds a WP_Query object, if you are trying to check if posts exists, shouldn’t it read:

    return $posts->posts[0]->ID;

    ?
    Thanks for your help.

    https://wordpress.org/plugins/w3-total-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fatal error: Cannot use object of type WP_Query as array’ is closed to new replies.