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.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Call to undefined method WP_Error::set_timeout()’ is closed to new replies.