Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 19c64818693ff4ba44e7c8e4b92f6c34e7a46db6 1 parent 5319552
dhawes authored

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 rss/rsslib.php
10 rss/rsslib.php
@@ -393,10 +393,10 @@ function rss_get_feed($rssid, $url, $type) {
393 393 $errorstring = $urlfailurestring .'<br /><br />'. $errorstring .'<br />';
394 394 }
395 395 $xml = load_feed_from_file($file);
396   - if (!empty($xml) && !empty($xml->xml) && empty($xml->ERROR)) {
  396 + if (!empty($xml) && empty($xml->xml) && !empty($xml->ERROR)) {
397 397 // Failed to load from cache as well!
398 398 if ($CFG->debug) {
399   - if (isset($xml) && isset($xml->ERROR)) {
  399 + if (!empty($xml) && !empty($xml->ERROR)) {
400 400 $errorstring = $xml->ERROR . $errorstring;
401 401 }
402 402 $errorstring = $filefailurestring . $file .'<br /><br />'. $errorstring .'<br />';
@@ -408,10 +408,10 @@ function rss_get_feed($rssid, $url, $type) {
408 408 } else {
409 409 // Cached file has not expired. Attempt to read from cached file.
410 410 $xml = load_feed_from_file($file);
411   - if (!empty($xml) && !empty($xml->xml) && empty($xml->ERROR)) {
  411 + if (!empty($xml) && empty($xml->xml) && !empty($xml->ERROR)) {
412 412 // Failed to load from cache, attempt to read from source
413 413 if ($CFG->debug) {
414   - if (isset($xml) && isset($xml->ERROR)) {
  414 + if (!empty($xml) && !empty($xml->ERROR)) {
415 415 $errorstring = $xml->ERROR . $errorstring .'<br />';
416 416 }
417 417 $errorstring = $filefailurestring . $file .'<br /><br />'. $errorstring .'<br />';
@@ -454,7 +454,7 @@ function rss_get_feed($rssid, $url, $type) {
454 454 }
455 455 }
456 456
457   - // echo 'DEBUG: feed\'s raw xml was loaded:<br />';//debug
  457 + // echo 'DEBUG: raw xml was loaded successfully:<br />';//debug
458 458 //print_object($xml); //debug
459 459
460 460 //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.