fix(oidc): replace deprecated $http_response_header with http_get_last_response_headers()
PHP 8.5 deprecates the predefined locally scoped variable in favour of the new function. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ class OidcHttpGateway
|
|||||||
$body = @file_get_contents($url, false, $ctx);
|
$body = @file_get_contents($url, false, $ctx);
|
||||||
$status = 0;
|
$status = 0;
|
||||||
$responseHeaders = [];
|
$responseHeaders = [];
|
||||||
|
$http_response_header = http_get_last_response_headers() ?? [];
|
||||||
if ($http_response_header !== []) {
|
if ($http_response_header !== []) {
|
||||||
foreach ($http_response_header as $i => $line) {
|
foreach ($http_response_header as $i => $line) {
|
||||||
if ($i === 0 && preg_match('/HTTP\/[\d.]+ (\d+)/', $line, $m)) {
|
if ($i === 0 && preg_match('/HTTP\/[\d.]+ (\d+)/', $line, $m)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user