Undefined property: etag in rss_fetch.inc

Been playing with MagpieRSS (Version 0.72, which has come on loads since I last looked at it), and seem to have come across a bug. Anyway, I’ve been using the caching (which seems to work quite nicely), but get the folowing error from time to time:

Notice:  Undefined property:  etag in /…/rss_fetch.inc on line 156

Did a quick Google and found the following solution by Mark McIntyre:

I made the following modification to rss_fetch.inc which fixes the problem:

Change the following line (156):

if( $rss and $rss->etag and $rss->last_modified) {

To the following:

if ( $rss and array_key_exists("etag", get_object_vars($rss)) and
array_key_exists("last_modified", get_object_vars($rss)) ) {

This will prevent the notice output if etag or last_modified keys don’t exist.

Time will tell if it works, but it looks like a sensible solution. My googling threw up loads of pages suffering from the problem but only this one solution, so hopefully others will find this useful.

Tags: , , ,

Sociable:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • Reddit
  • YahooMyWeb

One Response to “Undefined property: etag in rss_fetch.inc

  • Nancy
    July 21st, 2006 14:37
    1

    If I do book or DVD Review I put an amazon ad for the product in the post, haven’t had much luck with that either however.

    Blog explosion have launched their own blog host now called blog charm which “pays you to blog”, they show ads in the bar at the top and share out the profit between members. Haven’t heard anyone talking about it being really good or read anything anywhere yet however.

Leave a Reply