WordPress.org

Support

Support » Plugins and Hacks » rss.php errors with plugins?

rss.php errors with plugins?

  • All,

    Since upgrading to php 5.3, been seeing issues with various plugins, but mainly netflix-x2, where it throws the following error in my web error logs:

    [Mon Jan 11 20:30:50 2010] [error] [client 10.0.2.1] PHP Warning:  Invalid argument supplied for foreach() in /Library/WebServer/Documents/website/wp-content/plugins/netflix-x2/netflix.php on line 59
    [Mon Jan 11 20:33:56 2010] [error] [client 10.0.2.1] PHP Warning:  strpos() expects parameter 1 to be string, array given in /Library/WebServer/Documents/website/wp-includes/rss.php on line 577

    Looking around online, it looks like this is because using fetch_feed is deprecated. Has anyone else seen this? Anyone have a patch for netflix-x2?

    As a note, google-analytics-for-wordpress, and robots-meta both seem to link to rss.php as well.

    I’d have to guess something changed with PHP 5.3 that rss.php doesn’t like, but the only major difference I’ve found by googling was that preg_quote now escapes dashes… *shrugs*

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I uploaded this plugin but when I attempted to activate it, it said “plugin could not be activated because it triggered a fatal error.”

    Fixed my errors in netflix-x2 with this diff (of netflix-x2.php:

    58,59c58,59
    < 		$rss = fetch_rss($url);
    < 		foreach ($rss->items as $item) {
    ---
    > 		$rss = fetch_feed($url);
    > 		foreach ($rss->get_items() as $item) {
    65c65
    < 			$raw_title = $item['title'];
    ---
    > 			$raw_title = $item->get_title();
    68,69c68,69
    < 			$link = $item['link'];
    < 			$description = $item['description'];
    ---
    > 			$link = $item->get_link();
    > 			$description = $item->get_description();
    129c129
    < 	$rss = fetch_rss($url);
    ---
    > 	$rss = fetch_feed($url);

    < means remove, > means add. Numbers are line number.

    Not sure what would cause your fatal error.

    Hi Guys,

    I’m the author of Netflix-X2 – just wanted to let you know that I may have found/resolved the issue here.

    The rss-functions.php file which I was calling via include and provides the core functionality has depreiciated.

    I’ve updated the plugin to a new version 1.2.1 which calls the new version of this file, rss.php.

    Hopefully this works for you all – thanks very much for using the plugin and I hope it continues to work well for everyone.

    I’m using WordPress 2.9.2, and plugin works great. So I’ll be happy to help anyone out who is having issues. Feel free to email me: vanberge/at/gmail.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘rss.php errors with plugins?’ is closed to new replies.