WordPress.org

Ready to get started?Download WordPress

Forums

Flattr
[resolved] RSS feed with Flattr button dumps Warning (2 posts)

  1. Gwyneth Llewelyn
    Member
    Posted 2 years ago #

    Hi!

    A friend of mine who follows my RSS feed noticed that the following warning is dumped on the feed:

    Warning: in_array() expects parameter 2 to be array, string given in /home/[...]/wp-content/plugins/flattr/flattr.php on line 635

    This can be tracked to the following line:

    function flattr_post2rss($content) {
    global $post;
    
    $flattr = "";
    $flattr_post_types = get_option('flattr_post_types');
    
    $meta = get_post_meta($post->ID, '_flattr_btn_disable');
    
    $postmeta = isset($meta['_flattr_btn_disable'])? $meta['_flattr_btn_disable'] : true;
    
    if (($postmeta) && is_feed() && in_array(get_post_type(), $flattr_post_types)) {{

    Apparently in some cases flattr_post_types comes out as a string (if there is just one type, I guess) and this will naturally drop a warning.

    This should be an easy fix :)

    http://wordpress.org/extend/plugins/flattr/

  2. VoxPelli
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for reporting! I will fix this and it will be part of the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags