]> projects.mako.cc - scuttle/blobdiff - templates/sidebar.tpl.php
initial patch to cause scuttle to work with PHP 8.2
[scuttle] / templates / sidebar.tpl.php
index 5f399b539c51e33312eae39b140750e44cb5abce..1aed4b32d4bb9fc99b945c35c446004783b25720 100644 (file)
@@ -5,7 +5,11 @@
         $this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]);
     }
 
-    $size = count($rsschannels);
+    if (isset($rsschannels)) {
+        $size = count($rsschannels);
+    } else {
+        $size = 0;
+    }
     for ($i = 0; $i < $size; $i++) {
         echo '<p><a href="'. $rsschannels[$i][1] .'" title="'. $rsschannels[$i][0] .'"><img src="'. $GLOBALS['root'] .'rss.gif" width="16" height="16" alt="'. $rsschannels[$i][0] .'" /></a></p>'; 
     }

Benjamin Mako Hill || Want to submit a patch?