Skip to content

Commit 10927ef

Browse files
committed
[BUGFIX] Allow usage of HEADER_ROBOTS also in children classes
1 parent c497bdf commit 10927ef

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Classes/Controller/AbstractFrontendController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
abstract class AbstractFrontendController extends ActionController
1717
{
1818
protected const STATUS_BAD_REQUEST = 400;
19+
protected const STATUS_UNAUTHORIZED = 401;
1920
protected const STATUS_FORBIDDEN = 403;
2021
protected const STATUS_TOO_MANY_REQUESTS = 429;
2122
protected const STATUS_INTERNAL_SERVER_ERROR = 500;
@@ -57,7 +58,7 @@ protected function propagateClientError(string $message, int $code): never
5758

5859
protected function getStatus(Throwable $exception): int
5960
{
60-
foreach (self::EXCEPTION_STATUS_MAP as $exceptionClassName => $status) {
61+
foreach (static::EXCEPTION_STATUS_MAP as $exceptionClassName => $status) {
6162
if ($exception instanceof $exceptionClassName) {
6263
return $status;
6364
}
@@ -75,7 +76,7 @@ protected function getErrorResponse(string $message, int $code, int $status): Re
7576
],
7677
],
7778
$status,
78-
self::HEADERS_ROBOTS
79+
static::HEADERS_ROBOTS
7980
);
8081
}
8182
}

0 commit comments

Comments
 (0)