I am getting the following warning output from my site:

Warning: Cannot modify header information - headers already sent by (output started at /www/doc/www.xxx.com/www/themes/Divi/includes/builder/functions.php:1) in /www/doc/www.xxx.com/wp-includes/pluggable.php on line 1195.

first line in functions.php is

line 1195 is:

$location = wp_sanitize_redirect($location);

if ( !$is_IIS && PHP_SAPI != 'cgi-fcgi' )
    status_header($status); // This causes problems on IIS and some FastCGI setups

    **header("Location: $location", true, $status);**

    return true;

"header("Location: $location", true, $status);"

Read more here: Cannot Modify Header Warning


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: