Fix assignment error with allowed_status_codes in Status()

This commit is contained in:
Dale Davies
2023-03-06 12:10:45 +00:00
parent c260fef548
commit c878d0f11e

View File

@@ -83,7 +83,7 @@ class Status {
// show an error status in the UI if the response code is in the list of allowed codes.
// E.g. the server response with "418 I'm a teapot".
$status = $e->getResponse()->getStatusCode();
if (in_array($status, ((array)$this->site->status->allowed_status_codes ?? []))) {
if (in_array($status, (array)($this->site->status->allowed_status_codes ?? []))) {
return self::STATUS_ONLINE;
}
return self::STATUS_ERROR;