Skip to content

Commit

Permalink
Add typecast to array for implode() (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
PouleR authored and jwilsson committed Jun 12, 2017
1 parent 5f8c210 commit 713e8e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SpotifyWebAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ public function getAlbums($albumIds, $options = [])
$albumIds = $this->uriToId($albumIds, 'album');

$options = (array) $options;
$options['ids'] = implode(',', $albumIds);
$options['ids'] = implode(',', (array) $albumIds);

$headers = $this->authHeaders();

Expand Down Expand Up @@ -519,7 +519,7 @@ public function getArtist($artistId)
public function getArtists($artistIds)
{
$artistIds = $this->uriToId($artistIds, 'artist');
$artistIds = implode(',', $artistIds);
$artistIds = implode(',', (array) $artistIds);

$options = [
'ids' => $artistIds,
Expand Down Expand Up @@ -619,7 +619,7 @@ public function getAudioFeatures($trackIds)
{
$trackIds = $this->uriToId($trackIds);
$options = [
'ids' => implode(',', $trackIds),
'ids' => implode(',', (array) $trackIds),
];

$headers = $this->authHeaders();
Expand Down Expand Up @@ -1075,7 +1075,7 @@ public function getTrack($trackId, $options = [])
public function getTracks($trackIds, $options = [])
{
$trackIds = $this->uriToId($trackIds);
$options['ids'] = implode(',', $trackIds);
$options['ids'] = implode(',', (array) $trackIds);

$headers = $this->authHeaders();

Expand Down

0 comments on commit 713e8e7

Please sign in to comment.