]> git.mjollnir.org Git - moodle.git/commitdiff
Merged a notice fix
authormoodler <moodler>
Wed, 20 Feb 2008 08:11:02 +0000 (08:11 +0000)
committermoodler <moodler>
Wed, 20 Feb 2008 08:11:02 +0000 (08:11 +0000)
blocks/rss_client/block_rss_client.php

index b2d0d65ae973a661cf09f3fd41a1c4061d390c8f..64989425a7658a01003bd66069a1c37146954c1a 100644 (file)
                 }
             }
 
+            // first we must verify that the rss feed is loaded
+            // by checking $rss and $rss->items exist before using them
+            if (empty($rss) || empty($rss->items)) {
+                return '';
+            }
+
             if ($shownumentries > 0 && $shownumentries < count($rss->items) ) {
                 $rss->items = array_slice($rss->items, 0, $shownumentries);
             }
 
             $formatoptions->para = false;
 
-            // first we must verify that the rss feed is loaded
-            // by checking $rss and $rss->items exist before using them
-            if (empty($rss) || empty($rss->items)) {
-                return '';
-            }
 
             /// Accessibility: markup as a list.
             $returnstring .= '<ul class="list">'."\n";