diff --git a/src/Instagram.php b/src/Instagram.php index 757c3b2..2ee66c8 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -296,7 +296,12 @@ private function _makeCall($endpoint, $params = [], $method = 'GET') throw new InstagramException('Error: _makeCall() - cURL error: ' . curl_error($ch), curl_errno($ch)); } - curl_close($ch); + if (PHP_VERSION_ID >= 80000) { + unset($ch); + } else { + curl_close($ch); + } + return json_decode($jsonData); }