We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 306cc50 commit 6dfcad6Copy full SHA for 6dfcad6
src/Plugin/Spotify.php
@@ -59,7 +59,7 @@ public function onPublicText( Update $update )
59
60
// perform search
61
$result = $this->doSearch($query);
62
- if (!isset( $result['tracks']['items']) )
+ if (!isset( $result['tracks']['items']) || !count($result['tracks']['items']) )
63
{
64
$update->answerMessage("Nothing found :( Let's try again?");
65
return false;
@@ -137,6 +137,9 @@ private function doSearch( $query )
137
138
private function getTrackInformation($element )
139
140
+
141
+ if (!$element) return false;
142
143
// get names of artists and join them together
144
$artists = implode( ' & ', array_map(function ($artist){
145
return $artist['name'];
0 commit comments