Support » Fixing WordPress » Header error wp-includes/pluggable.php on line 876 cont'd

  • I found a thread about the following error I was getting which also blocked me from being able to access my admin panel..:

    Warning: Cannot modify header information – headers already sent by (output started at /home/xxxxx/public_html/wp-includes/functions.php:2841) in /home/xxxxx/public_html/wp-includes/pluggable.php on line 876

    and none of the advice given worked for me, yet the topic was closed to comments; so, I’m starting another thread to document what wound up working for me.
    There were no extra spaces in my case, and my opening and closing tags were fine, I also saved the files locally and saved as utf-8 without BOM and reloaded to the server, I also downloaded a fresh version of WordPress and swapped out the referenced files…and yet the error message persisted and kept referencing those same two files and two lines. It turns out the problem was in my wp-config.php file where I had changed define(‘WP_DEBUG’, false); to ‘true’ for developing a plugin. So on line 2841 of functions.php, there is this condition:

    if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
    		if ( ! is_null($replacement) )
    			trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
    		else
    			trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
    	}
    }

    That if (WP_DEBUG…, true) seems to have been the culprit, since when I revert to false, all is good. Hope that helps someone else…

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Header error wp-includes/pluggable.php on line 876 cont'd’ is closed to new replies.