WordPress.org

Ready to get started?Download WordPress

Forums

Pinterest RSS Widget
Call to undefined method WP_Error::set_timeout() (5 posts)

  1. madnetuser
    Member
    Posted 1 year ago #

    Hi,

    In pinterest-rss-widget.php line (61) you have a small bug.

    $rss object is not always the instance of SimplePie to use set_timeout() method in next line. Sometimes fetch_feed() returns instance of WP_Error.
    And its no longer possible to use methonds of SimplePie.

    The simplest fix of that is to change the code from:

    // Get a SimplePie feed object from the Pinterest feed source
    $rss = fetch_feed($pinsfeed);
    $rss->set_timeout(60);

    To:

    // Get a SimplePie feed object from the Pinterest feed source
    $rss = fetch_feed($pinsfeed);
    
    if($rss instanceof WP_Error)
        return '';
    
    $rss->set_timeout(60);

    If this fix is ok please include it in next version of module. This will help a lot of customers to save their handmade fixes after module updates.

    http://wordpress.org/plugins/pinterest-rss-widget/

  2. robrave
    Member
    Posted 12 months ago #

    Thanks for this, site no longer breaks at least.

  3. waterloft
    Member
    Posted 11 months ago #

    thanks, the error message disappeared! Only the pinterest pictures aren't visible. How can I make them visible? Do I have to much pins? Is the Pinterest server overloaded?

    http://www.waterloft.nl

  4. b3njooo
    Member
    Posted 11 months ago #

    Hello, Is this already resolved? I am receiving the same Error. On localhost the widget works as expected. Online i am receiving the error described above. Has this something to do with the settings of the webserver? Any ideas?

    THX!

  5. bkmacdaddy
    Member
    Plugin Author

    Posted 9 months ago #

    Please try upgrading to the latest version 2.2.4 and let me know if that resolves your issue. I've added the fix suggested by madnetuser (thank you!)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic