Q&A: Plugin breaking at bottom of page

Hi – I’m getting an error at the bottom of the Q & A page where people can subscribe.


Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/linweb09/f/fitness-saver.com/user/htdocs/wp-content/plugins/qa/core/subscriptions.php on line 20

I checked that line number, and I see the following:

$subscribers = get_post_meta( $id, ‘_sub’ );

$subscribed = in_array( get_current_user_id(), $subscribers ); <– error coming from 2nd param here

I’m not sure why this error is happening – can you help please?

  • ThePath
    • The Bug Hunter

    Hi dhilditch thanks for being a member and for your post.

    I visited your site and all looks well. I opened it up in FF and used Firebug but found no errors. Im guessing you fixed this issue?

    If so its always nice to hear how people solved the issues incase other users are searching for a similar solution.

    So let us know and mark as resolved if it is.


  • dhilditch
    • Design Lord, Child of Thor

    Hi, thanks for the quick response – turned out it was my own stupid fault – I’d been separately trying to get Comments Plus to work on Datafeedr pages (they are virtual pages with no postid) so had rewritten the is_single() function.

    Once I replaced the original code everything worked perfectly.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.