0

I'm trying to use SimplePie for Laravel to parse RSS feeds. I have followed the instructions and all, but can't seem to make it work.

This is my View. I echoed the rss

<?php $result = rssparser::parse(); 
echo $result;?>

And this error appears:

Non-static method SimplePie_Misc::fix_protocol() should not be called statically, assuming $this from incompatible context

C:\wamp\www\ctnpepo\bundles\rssparser\libraries\simplepie\SimplePie.php on line 834

Is there any way to fix this?

Antonio Carlos Ribeiro
  • 86,191
  • 22
  • 213
  • 204
emen
  • 6,050
  • 11
  • 57
  • 94
  • Can you instantiate `rssparser` and call `parse` on that object? – halfer Jun 23 '13 at 05:13
  • Well, I've tried calling `$parses = new rssparser();` with `foreach ($parses as $parse) echo $parse;`. But it returns nothing. Just, empty. Here's the rssparser config file if it would help http://pastebin.com/a1XaEpuB. I don't know what I've done wrong here. – emen Jun 23 '13 at 08:57
  • Well, I was thinking of a much simpler `$parser = new rssparser();` in your controller, and `$parser->parse()` in your view (though I don't know SimplePie nor Laravel). – halfer Jun 23 '13 at 09:40
  • 1
    [Duplicate?](http://stackoverflow.com/questions/9449775/using-simplepie-on-sample-php-page) – halfer Jun 23 '13 at 09:44
  • 1
    I finally did it Haha. Turns out that they removed `SimplePie.inc` since ver 1.3. I overwrote all folders and files from 1.4 to the old one. And downloaded the latest ver of `SimplePie.php` which is required in this bundle. Did the echo, and boom. Resolved. Thanks for your comment though :) – emen Jun 23 '13 at 09:53

1 Answers1

1

This is only a warning internally in SimplePie, and you can safely ignore it.

Ryan McCue
  • 1,628
  • 14
  • 23
  • 1
    Warning should not be ignored during development. It's great that it still works, but if during development you find more warnings, determining which warnings are OK and which are not gets tricky. Best just to have zero warnings on a page, so that _any_ warning messages can be understood as, well, a warning `:-)`. – halfer Jun 23 '13 at 05:16
  • 1
    Well, the reason this is really occurring is because the version of SimplePie in the bundle is outdated. That error was fixed a while back. – Ryan McCue Jun 23 '13 at 05:45
  • How do I ignore it when it stops me from going nowhere? :( I did update the package, but the problem still persists. – emen Jun 23 '13 at 08:46
  • @amnbhrm: ^ I think Ryan means that he expects it to work despite the warning. – halfer Jun 23 '13 at 09:42