Menu

#12 Undefined property etag, ver 0.61

open
nobody
None
5
2004-07-08
2004-07-08
Terre
No

I was receiving this error:
Notice: Undefined property: etag in
..\special_section\tech_corner\magpierss\rss_fetch.inc
on line 152

I fixed this by changing the following.

// setup headers
if ( $cache_status == 'STALE' ) {
$rss = $cache->get( $url );
if ( $rss->etag and $rss->last_modified ) {
...

changed to

// setup headers
if ( $cache_status == 'STALE' ) {
$rss = $cache->get( $url );
if ( isset($rss->etag) and isset($rss->last_modified) ) {
...

Note: After adding in the isset($rss->etag) i then
received the same mesage about the $rss->last_modified,
so i added a isset() for it too.

I've only ran the script for about a day now, no other
problems to report.

incase its something about the feed, here is the link
i'm using http://news.com.com/2547-1009_3-0-5.xml and
the page loading the script
http://www.tbnweekly.com/special_section/tech_corner/

Let me know if more information is needed or anything.

Btw, excellent script :)

Discussion

  • Thaxton Mauzy

    Thaxton Mauzy - 2005-08-17

    Logged In: YES
    user_id=400321

    Does anyone know if this bug was ever addressed? I
    checked the latest version on CVS (.71) and the change
    doesn't appear to be in there...was it removed for any reason,
    or is it safe to make the change locally? I'm seeing that
    same "Undefined property" tag in the log files.

    Wonderful script though - very helpful, very easy to use.

     
  • Terre

    Terre - 2005-08-18

    Logged In: YES
    user_id=987466

    Good question :)

    Yours is the first reply i've ever received. I can say that
    i haven't had problems since making the changes mentioned.
    Though I haven't upgraded to the .71 version yet.

     
  • Matthew Turland

    Matthew Turland - 2006-01-07

    Logged In: YES
    user_id=485454

    I'm having what I think is the same issue. I'm running PHP
    5.1.1 on Windows XP and getting this error message:

    Notice: Undefined property: MagpieRSS::$etag in C:\Program
    Files\Apache2\htdocs\blog\magpierss\rss_fetch.inc on line 156

    The line number is different, but the issue and fix seem to
    be exactly the same for some reason. Odd.

     
  • thing2b

    thing2b - 2006-10-24

    Logged In: YES
    user_id=1018701

    In reply to Mauzyj, No. This bug has never been fixed in
    0.72. The following is from my log file.

    [25-Oct-2006 08:17:38] PHP Notice: Undefined property:
    MagpieRSS::$etag in /.../magpierss-0.72/rss_fetch.inc on
    line 156

     

Log in to post a comment.