I am having this error in a developing plugin.
Works fine in localhost but in the remote server fails with:
Warning: Cannot modify header information - headers already sent by (output started at /path_wordpress/public_html/wp-admin/includes/template.php:1657) in /path_wordpress/public_html/wp-includes/pluggable.php on line 866
I have removed all spaces before and after at the beginning and end of files (the common reason for this error) and there are no sessions involved.
What another reasons could be?
===
EDIT 1
wp-admin/includes/template.php:
$attributes = '';
if ( is_array( $other_attributes ) ) {
foreach ( $other_attributes as $attribute => $value ) { // line 1657
$attributes .= $attribute . '="' . esc_attr( $value ) . '" '; // Trailing space is important
}
} else if ( !empty( $other_attributes ) ) { // Attributes provided as a string
$attributes = $other_attributes;
}
===
EDIT 2:
wp-admin/wp-includes/pluggable.php:
if ( !function_exists('wp_redirect') ) :
/**
* Redirects to another page.
*
* @since 1.5.1
* @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
*
* @param string $location The path to redirect to
* @param int $status Status code to use
* @return bool False if $location is not set
*/ // line 866
function wp_redirect($location, $status = 302) {
global $is_IIS;