There is a bug here:
|
if (!$this->httpResponse->isSent()) { |
|
$this->httpResponse->setCode($e instanceof BadRequestException ? ($e->getCode() ?: 404) : 500); |
|
} |
The check if (!$this->httpResponse->isSent()) { is not enough to know that it is possible to send a header (or set HTTP code in this case). It can still throw this error:
|
trigger_error('Possible problem: you are sending a HTTP header while already having some data in output buffer. Try OutputDebugger or start session earlier.', E_USER_NOTICE); |
.
There is a bug here:
nette/Nette/Application/Application.php
Lines 166 to 168 in 0474caf
The check
if (!$this->httpResponse->isSent()) {is not enough to know that it is possible to send a header (or set HTTP code in this case). It can still throw this error:nette/Nette/Http/Response.php
Line 315 in 0474caf