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 {