Merge pull request #5614 from cakephp/issue-5595

Convert header_sent exception into a notice error.
This commit is contained in:
José Lorenzo Rodríguez 2015-01-09 22:25:09 +01:00
commit 0a4141c78c

View file

@ -513,16 +513,15 @@ class CakeResponse {
/**
* Sends a header to the client.
*
* Will skip sending headers if headers have already been sent.
*
* @param string $name the header name
* @param string $value the header value
* @return void
* @throws CakeException When headers have already been sent
*/
protected function _sendHeader($name, $value = null) {
if (headers_sent($filename, $linenum)) {
throw new CakeException(
__d('cake_dev', 'Headers already sent in %s on line %s', $filename, $linenum)
);
return;
}
if ($value === null) {
header($name);