• Line 1494:

    elseif (is_single() || is_page() && count($posts)) {
            return $posts[0]->ID;
        }

    This code is getting triggered even when $posts is empty — should this line be:

    elseif ((is_single() || is_page())) && count($posts)) {

    with the extra brackets, so that $posts is always checked to make sure it has an element at [0]?

    Cheers

    Jeremy

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

  • The topic ‘w3_detect_post_id generating a notice’ is closed to new replies.