• I’m getting the following in a few of my pages:

    [25-Jul-2017 12:04:07 UTC] PHP Fatal error: Cannot use object of type WP_Query as array in /home/honeymoo/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1487
    [25-Jul-2017 12:04:07 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is your line 1487 this:

    if (is_single() || is_page()) return $posts[0]->ID;

    That $posts variable is supposed to be an array. Are you changing that?

    You might be using another plugin that uses the output buffer if you’re getting that PHP fatal error.

    Thread Starter fabiompedrosa

    (@fabiompedrosa)

    Yes, the line is that one exactly.

    The page its failling actually looks for posts like this:

    
    $posts = new WP_Query( $args );
    if ( $posts->have_posts() ) {
    	while ( $posts->have_posts() ) {
    		$posts->the_post();
    		...
    

    How can I make them compatible?

    • This reply was modified 8 years, 10 months ago by fabiompedrosa.
    Thread Starter fabiompedrosa

    (@fabiompedrosa)

    I renamed that $posts to something else, and should be fixed right?

    Yeah, renaming your $posts variable will fix the problem.

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

The topic ‘Urgent: Error 502 from Super Cache’ is closed to new replies.