From 10fbd9ae0da0de25413a2523b2588bbf9d620cd4 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 13 Nov 2024 07:30:06 +0000 Subject: [PATCH] CURLOPT_HTTPHEADER requires an array. --- phplib/mapit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phplib/mapit.php b/phplib/mapit.php index 8080450c..53f62668 100644 --- a/phplib/mapit.php +++ b/phplib/mapit.php @@ -38,7 +38,7 @@ function mapit_call($url, $params, $opts = array(), $errors = array()) { curl_setopt($mapit_ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($mapit_ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($mapit_ch, CURLOPT_USERAGENT, 'PHP MaPit client'); - if (defined('OPTION_MAPIT_API_KEY')) curl_setopt($mapit_ch, CURLOPT_HTTPHEADER, 'X-Api-Key: '. OPTION_MAPIT_API_KEY); + if (defined('OPTION_MAPIT_API_KEY')) curl_setopt($mapit_ch, CURLOPT_HTTPHEADER, ['X-Api-Key: '. OPTION_MAPIT_API_KEY]); } if (is_array($params)) $params = join(',', $params); if (strpos($url, '/'))