We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c18182 commit 9fdd068Copy full SHA for 9fdd068
src/Lookup/HttpLookupService.php
@@ -118,6 +118,7 @@ protected function parseTopic(string $topic): array
118
/**
119
* @param string $url
120
* @return array
121
+ * @throws RuntimeException
122
*/
123
protected function request(string $url): array
124
{
@@ -138,8 +139,12 @@ protected function request(string $url): array
138
139
$headers[] = 'Authorization: Bearer ' . $auth->authData();
140
}
141
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $result = json_decode(curl_exec($ch), true);
142
+ $response = curl_exec($ch);
143
+ $result = json_decode($response, true);
144
curl_close($ch);
145
+ if (!is_array($result)) {
146
+ throw new RuntimeException('Pulsar Connect Failed');
147
+ }
148
return $result;
149
150
0 commit comments