Skip to content
Browse files

cleaned up a bad copy/paste in a few if statements

  • Loading branch information...
1 parent 5319552 commit 19c64818693ff4ba44e7c8e4b92f6c34e7a46db6 dhawes committed Jan 20, 2005
Showing with 5 additions and 5 deletions.
  1. +5 −5 rss/rsslib.php
View
10 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.

0 comments on commit 19c6481

Please sign in to comment.
Something went wrong with that request. Please try again.