From 7ea431584a636289f73e662aadb16014a7cb951a Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 27 Sep 2010 18:38:52 +0000
Subject: [PATCH] Fixed a warning when no faq categories are defined.

---
 interface/web/help/lib/module.conf.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php
index c783228911..676e67512e 100644
--- a/interface/web/help/lib/module.conf.php
+++ b/interface/web/help/lib/module.conf.php
@@ -56,11 +56,12 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
 $sql = "SELECT * FROM help_faq_sections";
 $res = $app->db->queryAllRecords($sql);
 //* all the content sections
-foreach($res as $v)
-{
+if(is_array($res)) {
+	foreach($res as $v) {
         $itemsfaq[] = array( 'title'   => $v['hfs_name'],
                   'target'  => 'content',
                   'link'    => 'help/faq_list.php?hfs_id='.$v['hfs_id']);
+	}
 }
 
 $module['nav'][] = array( 'title' => 'FAQ',
-- 
GitLab