aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions_category.inc.php')
-rw-r--r--include/functions_category.inc.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index 5c76dd065..1c04c70d2 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -761,10 +761,13 @@ function display_select_cat_wrapper($query, $selecteds, $blockname,
{
$result = pwg_query($query);
$categories = array();
+ if (!empty($result))
+ {
while ($row = mysql_fetch_array($result))
{
array_push($categories, $row);
}
+ }
usort($categories, 'global_rank_compare');
display_select_categories($categories, $selecteds, $blockname, $fullname);
}