From 19c64818693ff4ba44e7c8e4b92f6c34e7a46db6 Mon Sep 17 00:00:00 2001
From: dhawes <dhawes>
Date: Thu, 20 Jan 2005 01:01:48 +0000
Subject: [PATCH] cleaned up a bad copy/paste in a few if statements

---
 rss/rsslib.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/rss/rsslib.php b/rss/rsslib.php
index 82e35ba0d4..15453fba9c 100644
--- a/rss/rsslib.php
+++ b/rss/rsslib.php
@@ -393,10 +393,10 @@ function rss_get_feed($rssid, $url, $type) {
                     $errorstring = $urlfailurestring .'<br /><br />'. $errorstring .'<br />';
                 }
                 $xml = load_feed_from_file($file);
-                if (!empty($xml) && !empty($xml->xml) && empty($xml->ERROR)) {
+                if (!empty($xml) && empty($xml->xml) && !empty($xml->ERROR)) {
                     // Failed to load from cache as well!
                     if ($CFG->debug) {
-                        if (isset($xml) && isset($xml->ERROR)) {
+                        if (!empty($xml) && !empty($xml->ERROR)) {
                            $errorstring = $xml->ERROR . $errorstring;
                         }
                         $errorstring = $filefailurestring . $file .'<br /><br />'. $errorstring .'<br />';
@@ -408,10 +408,10 @@ function rss_get_feed($rssid, $url, $type) {
         } else {
             // Cached file has not expired. Attempt to read from cached file.
             $xml = load_feed_from_file($file);
-            if (!empty($xml) && !empty($xml->xml) && empty($xml->ERROR)) {
+            if (!empty($xml) && empty($xml->xml) && !empty($xml->ERROR)) {
                 // Failed to load from cache, attempt to read from source
                 if ($CFG->debug) {
-                    if (isset($xml) && isset($xml->ERROR)) {
+                    if (!empty($xml) && !empty($xml->ERROR)) {
                        $errorstring = $xml->ERROR . $errorstring .'<br />';
                     }
                     $errorstring = $filefailurestring . $file .'<br /><br />'. $errorstring .'<br />';
@@ -454,7 +454,7 @@ function rss_get_feed($rssid, $url, $type) {
         }
     }
     
-    // echo 'DEBUG: feed\'s raw xml was loaded:<br />';//debug
+    // echo 'DEBUG: raw xml was loaded successfully:<br />';//debug
     //print_object($xml); //debug
     
     //implode xml file. in some cases this operation may fail, capture failure info to errorstring.
-- 
2.39.5