forked from fa/breadcrumb-the-shire
fix(phpstan): simplify http_response_header check in OidcHttpGateway
This commit is contained in:
@@ -49,7 +49,7 @@ class OidcHttpGateway
|
||||
$body = @file_get_contents($url, false, $ctx);
|
||||
$status = 0;
|
||||
$responseHeaders = [];
|
||||
if (isset($http_response_header) && is_array($http_response_header)) {
|
||||
if ($http_response_header !== []) {
|
||||
foreach ($http_response_header as $i => $line) {
|
||||
if ($i === 0 && preg_match('/HTTP\/[\d.]+ (\d+)/', $line, $m)) {
|
||||
$status = (int) $m[1];
|
||||
|
||||
Reference in New Issue
Block a user