Skip to content

Commit dc3cdc3

Browse files
committed
fix: 🐛 Warning http_response_header deprecated
Replaces http_response_header with http_get_last_response_headers ✅ Closes: #18
1 parent df4d0e2 commit dc3cdc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AbstractGeocoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ protected function getJSONByFopen($query)
7171
if ($ret === false) {
7272
/** NOTE: https://github.com/phpstan/phpstan/issues/3213 */
7373
/** @phpstan-ignore-next-line */
74-
if (isset($http_response_header) && is_array($http_response_header)) {
75-
$error_message = $http_response_header[0];
74+
if (isset($http_get_last_response_headers) && is_array($http_get_last_response_headers)) {
75+
$error_message = $http_get_last_response_headers[0];
7676
if ($error = error_get_last()) {
7777
$error_message = $error['message'];
7878
}

0 commit comments

Comments
 (0)