From e8548bad0cc2645cee00f24fb4aa16628c7119f4 Mon Sep 17 00:00:00 2001 From: BeniaminKowol <54525219+BeniaminKowol@users.noreply.github.com> Date: Fri, 16 Apr 2021 03:09:08 +0200 Subject: [PATCH] Fixed Warnings throwed by array_key_exists array_key_exists throwed Warnings, when $response variable passed to it wasn't array --- lib/OpenNode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenNode.php b/lib/OpenNode.php index 738e218..43153e6 100644 --- a/lib/OpenNode.php +++ b/lib/OpenNode.php @@ -80,7 +80,7 @@ public static function request($url, $method = 'POST', $params = array(), $authe $response = json_decode(curl_exec($curl), TRUE); $http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE); - if (array_key_exists('data', $response)){ + if (is_array($response) && array_key_exists('data', $response)){ return $response['data']; } else {