Support » Plugin: Pinterest RSS Widget » Call to undefined method WP_Error::set_timeout()

  • 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks for this, site no longer breaks at least.

    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

    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!

    Plugin Author bkmacdaddy

    (@bkmacdaddy)

    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!)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Call to undefined method WP_Error::set_timeout()’ is closed to new replies.