Title: Function problem with Brian&#8217;s Latest Comments
Last modified: August 18, 2016

---

# Function problem with Brian’s Latest Comments

 *  [jbsa](https://wordpress.org/support/users/jbsa/)
 * (@jbsa)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/function-problem-with-brians-latest-comments/)
 * I get this message underneath my Latest Comments:
 *  Warning: Invalid argument supplied for foreach() in Line 87
 * And in the PHP file (incl Line 87):
 * foreach($posts as $post)
    { // The following 5 lines is a manual DISTINCT and
   LIMIT, // since mysql 3.x doesn’t allow you to control which way a DISTINCT //
   select merges multiple entries. if(array_key_exists($post->comment_post_ID, $
   seen)) continue; $seen[$post->comment_post_ID] = true; if($num++ > $num_posts)
   break;
 * Any idea where I am going wrong?

Viewing 1 replies (of 1 total)

 *  [spencerp](https://wordpress.org/support/users/spencerp/)
 * (@spencerp)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/function-problem-with-brians-latest-comments/#post-445629)
 * I never used this plugin before, but..what version of the plugin is it? What 
   version of WordPress are you running? Can we have a URL to the blog, so “we” 
   can see this error first hand?
 * If you haven’t already, here is where to grab the latest version for Brian’s 
   Latest Comments.
    [http://meidell.dk/archives/2005/11/09/brianslatest-comments-155/](http://meidell.dk/archives/2005/11/09/brianslatest-comments-155/)
 * Hopefully someone with a little more knowledge on this plugin, swings by soon
   though.. =) 😉
 * spencerp

Viewing 1 replies (of 1 total)

The topic ‘Function problem with Brian’s Latest Comments’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [spencerp](https://wordpress.org/support/users/spencerp/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/function-problem-with-brians-latest-comments/#post-445629)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
