From 0ec819d38161ead063c4dbd953b4b55a33a42f80 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 23 Apr 2011 07:46:38 -0700 Subject: Insure that the tag count to display is always greater than 0. Refixes #1649. --- modules/tag/helpers/tag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/tag') diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 742783d1..c21104ee 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -48,7 +48,7 @@ class tag_Core { * @return ORM_Iterator of Tag_Model in descending tag count order */ static function popular_tags($count) { - $count = $count >= 1 ? $count : 30; + $count = max($count, 1); return ORM::factory("tag") ->order_by("count", "DESC") ->limit($count) -- cgit v1.2.3