fixed bugs
This commit is contained in:
@@ -11,7 +11,7 @@ class sliderkz extends searchBase implements searchInterface
|
|||||||
protected $query = null;
|
protected $query = null;
|
||||||
protected $tableTitles = [];
|
protected $tableTitles = [];
|
||||||
|
|
||||||
public function __construct($crawler,$client)
|
public function __construct($crawler, $client)
|
||||||
{
|
{
|
||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
}
|
}
|
||||||
@@ -61,12 +61,11 @@ class sliderkz extends searchBase implements searchInterface
|
|||||||
try {
|
try {
|
||||||
$response = $this->client->request('GET', $this->searchUrl, ['query' => $this->query]);
|
$response = $this->client->request('GET', $this->searchUrl, ['query' => $this->query]);
|
||||||
$resp = $response->toArray();
|
$resp = $response->toArray();
|
||||||
|
if (isset($resp['audios'])) {
|
||||||
|
return array_values($resp["audios"])[0];
|
||||||
|
}
|
||||||
} catch (ExceptionInterface $e) {
|
} catch (ExceptionInterface $e) {
|
||||||
$this->errors[] = $e->getMessage();
|
$this->errors[] = $e->getMessage();
|
||||||
return [];
|
|
||||||
}
|
|
||||||
if (isset($resp['audios'])) {
|
|
||||||
return array_values($resp["audios"])[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in New Issue
Block a user