- Previous commit wasn't a completed feature ; now it is

This commit is contained in:
Dave Mc Nicoll 2022-05-11 12:34:38 +00:00
parent 5c06419f15
commit a78d20bc32
1 changed files with 1 additions and 5 deletions

View File

@ -64,7 +64,7 @@ trait ControllerTrait {
public function renderError(string $errorCode, ?array $variables = null) : ResponseInterface
{
return static::renderHtml(
$this->renderRawView("$lean/error/{$code}", $variables ?? [])
$this->renderRawView("lean/error/{$errorCode}", $variables ?? [])
);
}
@ -74,10 +74,6 @@ trait ControllerTrait {
}
protected function redirect(string $url, int $code = 302, array $headers = []) {
if ($code === 302 && empty(array_change_key_case($headers, CASE_LOWER)['cache-control'])) {
$headers['cache-control'] = 'no-store';
}
return new RedirectResponse($url, $code, $headers);
}