mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
throw CakeException instead, putting throws tag in the comment
This commit is contained in:
parent
809de69dcf
commit
e08b8148a5
1 changed files with 2 additions and 1 deletions
|
@ -517,6 +517,7 @@ class CakeResponse {
|
||||||
* @param string $name the header name
|
* @param string $name the header name
|
||||||
* @param string $value the header value
|
* @param string $value the header value
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws CakeException When an header already been sent
|
||||||
*/
|
*/
|
||||||
protected function _sendHeader($name, $value = null) {
|
protected function _sendHeader($name, $value = null) {
|
||||||
if (!headers_sent($filename, $linenum)) {
|
if (!headers_sent($filename, $linenum)) {
|
||||||
|
@ -527,7 +528,7 @@ class CakeResponse {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Configure::read('debug')) {
|
if (Configure::read('debug')) {
|
||||||
throw new Exception(__d('cake_dev', 'Headers already sent in $filename on line $linenum'));
|
throw new CakeException(__d('cake_dev', 'Headers already sent in $filename on line $linenum'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue