Posted by fadgadget on July 7, 2012 at 7:08pm
4 followers
| Project: | SoundCloud Tools |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Hello i get this error when i try to enable this module.
Parse error: syntax error, unexpected ';', expecting ')' in /home/xxxxx/public_html/sites/all/modules/soundcloud_tools/soundcloud_api.module on line 96
I deleted the module. Love to use it.
thanks
Comments
#1
I'm getting this error as well. This module would be a LIFE SAVER if it worked...
#2
Hi every one did you upload the soundcloud in https://github.com/mptre/php-soundcloud/downloads and put it on /sites/all/modules/soundcloud_tools folder?
#3
also please reply to me if you are still getting error when you have already put the Services folder..
attach
patch apply to git off of the error
#4
sorry here is the patch
#5
Thank you so much for the patch, it seems to do something, although now there is a new error which breaks the whole site:
#6
hi are you testing this in your localhost or in a live site? because in my localhost i have no error on this..
and it is running smoothly
#7
I am building online, so that might be where the issue is.
#8
HI please update the file
/soundcloud_tools/Services/Soundcloud.php line 685
current code
$postData = array_map(function ($track) {
please change to
$postData = array_map(function ($track)) {
#9
Damn, no sorry, man. It still doesn't seem to help the problem. :/
#10
is the problem still exists? hmff.. is the problem the same from what you have stated in #5?
#11
line 682-701.. please change the current function with this one...
public function updatePlaylist($playlistId, $trackIds, $optionalPostData = null)
{
$url = $this->_buildUrl('playlists/' . $playlistId);
$postData = array_map(function($track){ return 'playlist[tracks][][id]=' . $track;} , $trackIds);
if (is_array($optionalPostData)) {
foreach ($optionalPostData as $key => $val) {
array_push($postData, 'playlist[' . $key . ']=' . $val);
}
}
$postData = implode('&', $postData);
$curlOptions = array(
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => array('Content-Length' => strlen($postData)),
CURLOPT_POSTFIELDS => $postData
);
return $this->_request($url, $curlOptions);
}
#12
also what php version are you using?
because if it is 5.2 it will make an error.. you must update the version to 5.3
#13
Just chipping in to say that comment #4's patch fixed a white screen issue on a PHP 5.3 server, so thank you.
#14
At least I know there is hope. On my test domain I have PHP Version 5.2.17, but I know most have 5.3.
I'll have to set up on a new server and check again to see if I can get it working!!
#15
@WhereverPanda
just post a feedback here if there are some issue
#16
It's been a long time, but I have finally started playing with this module again, and it works BEAUTIFULLY now. Seriously, awesome module - and it works flawlessly.
The only thing I am personally missing is an option to use an HTML5 player instead of flash. Will you by any chance be looking into this in the future?