mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
replace whitespaces with TABs and only throw exception when Cake is in Debug mode
This commit is contained in:
parent
792c251890
commit
809de69dcf
1 changed files with 5 additions and 3 deletions
|
@ -519,14 +519,16 @@ class CakeResponse {
|
|||
* @return void
|
||||
*/
|
||||
protected function _sendHeader($name, $value = null) {
|
||||
if (!headers_sent($filename, $linenum)) {
|
||||
if (!headers_sent($filename, $linenum)) {
|
||||
if ($value === null) {
|
||||
header($name);
|
||||
} else {
|
||||
header("{$name}: {$value}");
|
||||
}
|
||||
} else {
|
||||
throw new Exception("Headers already sent in $filename on line $linenum\n");
|
||||
} else {
|
||||
if (Configure::read('debug')) {
|
||||
throw new Exception(__d('cake_dev', 'Headers already sent in $filename on line $linenum'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue