fixed bugs

This commit is contained in:
huangjx
2022-03-05 14:31:06 +08:00
parent c7fd0f32af
commit 67ab4a1f9f

View File

@@ -61,13 +61,12 @@ class sliderkz extends searchBase implements searchInterface
try {
$response = $this->client->request('GET', $this->searchUrl, ['query' => $this->query]);
$resp = $response->toArray();
} catch (ExceptionInterface $e) {
$this->errors[] = $e->getMessage();
return [];
}
if (isset($resp['audios'])) {
return array_values($resp["audios"])[0];
}
} catch (ExceptionInterface $e) {
$this->errors[] = $e->getMessage();
}
return [];
}