1
0

fix(phpstan): simplify http_response_header check in OidcHttpGateway

This commit is contained in:
aminovfariz
2026-06-05 14:56:37 +02:00
parent 668a67c094
commit 0a56c741e8

View File

@@ -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];