fix a warning when a barrel's menu is empty
authorJeremy Laine <jeremy.laine@m4x.org>
Mon, 17 Jul 2006 08:12:13 +0000 (08:12 +0000)
committerJeremy Laine <jeremy.laine@m4x.org>
Mon, 17 Jul 2006 08:12:13 +0000 (08:12 +0000)
ChangeLog
include/Barrel/Menu.php

index 64cabd8..5e98829 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@ Diogenes 0.9.20
  * improved - overhaul of the plugin system
  * added - add RSS feeds describing public changes to barrels
 
+Diogenes 0.9.19.1
+ * fixed - fix a warning when a barrel's menu is empty
+
 Diogenes 0.9.19
  * fixed - fix handling of filter plugins without arguments
  * improved - reduce database calls used to build a page's menu
index 34d70e0..e5279c9 100644 (file)
@@ -165,6 +165,7 @@ class Diogenes_Barrel_Menu
   function menuRead()
   {
     $menu = array();
+    $menu[0]['children'] = array();
     $res = $this->dbh->query("select MID,MIDpere,title,link,PID,ordre from {$this->table_menu} order by ordre");
     while (list($mid, $parent, $title, $link, $pid, $ordre) = mysql_fetch_row($res))
     {