From 89097498bb484c30240aa05454e6861eabbab714 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Sat, 26 Mar 2016 12:53:10 -0500
Subject: [PATCH] client: Only show "Featured Questions" header if there are
 questions

---
 include/client/templates/sidebar.tmpl.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/client/templates/sidebar.tmpl.php b/include/client/templates/sidebar.tmpl.php
index 09f9bd689..682f88d7b 100644
--- a/include/client/templates/sidebar.tmpl.php
+++ b/include/client/templates/sidebar.tmpl.php
@@ -20,7 +20,7 @@ $BUTTONS = isset($BUTTONS) ? $BUTTONS : true;
 <?php } ?>
         <div class="content"><?php
     $faqs = FAQ::getFeatured()->select_related('category')->limit(5);
-    if ($faqs->all()) { ?>
+    if (count($faqs)) { ?>
             <section><div class="header"><?php echo __('Featured Questions'); ?></div>
 <?php   foreach ($faqs as $F) { ?>
             <div><a href="<?php echo ROOT_PATH; ?>kb/faq.php?id=<?php
-- 
GitLab