When I enable WP_DEBUG, I am getting the error:
WARNING: wp-admin/admin-header.php:9 - Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/site-url.com/wp-includes/functions.php:3886) require_once('wp-admin/admin-header.php'), header
but it is only happening on wp-admin pages, not on the front end.
I have read about this in support pages like this Codex FAQ page and rather than fiddling with text editors and encoding, I simply downloaded WordPress core from the release archive for the same version that's on my site (version 4.5.5 - I am in the process of debugging before I upgrade), and I replaced my local site's version of functions.php with the functions.php file I freshly downloaded from the release archive. That had no effect.
Line 3886 of functions.php is the 3rd line below (the first if ( ! is_null( $message ) )
):
if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
if ( ! is_null( $message ) )
trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) );
else
trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
} else {
if ( ! is_null( $message ) )
trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
else
trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
}
}
How do I resolve / further isolate this error?