From 7ea431584a636289f73e662aadb16014a7cb951a Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 27 Sep 2010 14:38:52 -0400
Subject: [PATCH] Fixed a warning when no faq categories are defined.
---
interface/web/help/lib/module.conf.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/interface/web/help/lib/module.conf.php b/interface/web/help/lib/module.conf.php
index c783228..676e675 100644
--- a/interface/web/help/lib/module.conf.php
+++ b/interface/web/help/lib/module.conf.php
@@ -56,11 +56,12 @@
$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',
--
Gitblit v1.9.1