From c937a29d6c25718a6b050e57dce1fe5c50ec5d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Thu, 23 May 2013 18:33:02 +0200 Subject: [PATCH] Fix when no languages are found. re #66 --- language.php | 1 + 1 file changed, 1 insertion(+) diff --git a/language.php b/language.php index 8f3a1f5..8991e3c 100644 --- a/language.php +++ b/language.php @@ -29,6 +29,7 @@ class language extends Base { public static function getCount() { $nLanguages = parent::getDb ()->query('select count(*) from languages')->fetchColumn(); + if ($nLanguages == 0) return NULL; $entry = new Entry (localize("languages.title"), self::ALL_LANGUAGES_ID, str_format (localize("languages.alphabetical", $nLanguages), $nLanguages), "text non", array ( new LinkNavigation ("?page=".parent::PAGE_ALL_LANGUAGES)));