Skip to content
Browse files

Use a simple foreach here because array_map only supports lambda func…

…tion as of PHP 5.3.0
  • Loading branch information...
1 parent ebcd400 commit c31217ad4dd4d7e43ff2b89930b63aa4c5e9f2fc @por por committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 Services/Soundcloud.php
View
8 Services/Soundcloud.php
@@ -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 c31217a

Please sign in to comment.
Something went wrong with that request. Please try again.