Permalink
Browse files

Merge pull request #14 from por/master

Add support for older PHP 5.x.x versions
  • Loading branch information...
2 parents ebcd400 + c31217a commit d30406a03925d6547b06fb7b1abca1b47d2923d2 Anton Lindqvist committed Jan 17, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 Services/Soundcloud.php
View
@@ -717,9 +717,11 @@ function download($trackId, $params = array(), $curlOptions = array())
public function updatePlaylist($playlistId, $trackIds, $optionalPostData = null)
{
$url = $this->_buildUrl('playlists/' . $playlistId);
- $postData = array_map(function ($track) {
- return 'playlist[tracks][][id]=' . $track;
- }, $trackIds);
+
+ $postData = array();
+ foreach ($trackIds as $trackId) {
+ $postData[] = 'playlist[tracks][][id]=' . $trackId;
+ }
if (is_array($optionalPostData)) {
foreach ($optionalPostData as $key => $val) {

0 comments on commit d30406a

Please sign in to comment.