Closed (fixed)
Project:
Facebook Live Stream Module
Version:
6.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2009 at 08:50 UTC
Updated:
20 Oct 2009 at 06:00 UTC
When I click on the number of comments link i.e. "x comments", I get an error
Invalid argument supplied for foreach() in /www/drupal/indic/sites/all/modules/facebook_stream/comments_display.tpl.php on line 7.
I checked the functioning of the module and it turns out that it should ask for permission first but apparently, it didn't do that in my case! Any idea why it maybe happening?
Comments
Comment #1
ravdeepchawla commentedHi folks, I fixed the error but the issue is too small to create a patch for it...
The issue is with this line...
function fb_stream_get_post_comments() {
$post_id = $_POST['post_id']; // Returns a value "xxxxxxxxx_yyyyyyyyyyyy " Notice the white space at the end
I fixed it using a simple trim function in the next line...
- $comments = $fb->api_client->stream_getComments($post_id);
+ $comments = $fb->api_client->stream_getComments(trim($post_id));
Comment #2
ravdeepchawla commentedMarking as needs review.. I guess the maintainer can test it out and mark it RTBC. Pretty minor change only...
Comment #3
pflame commentedHi ravdeepchawla,
I will check total module code about this type of errors. Thanks for taking time and providing patch.
Comment #4
pflame commentedFixed this on the development release. It will take 24 hours to get updated on the development release