Skip to content

Commit

Permalink
πŸ› Do not try to set header if already set
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel James committed Mar 25, 2019
1 parent ae59265 commit ac005fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controller/class-ms-controller-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ public function __construct() {
break;
}
}
if ( ! $p3p_done ) { header( 'P3P:CP="NOI"' ); }

// We can not set header, when it's already sent.
if ( ! $p3p_done && ! headers_sent() ) {
header( 'P3P:CP="NOI"' );
}

/*
* Remove the "&msg" attribute from the URL if it was already present in
Expand Down

0 comments on commit ac005fd

Please sign in to comment.