From ece21fbe9a0c32dba0b9dcdd52849dcef49c5ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 5 May 2011 09:08:37 +0200 Subject: [PATCH] Check if directory exists --- libraries/select_lang.lib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php index 2751df3e5..08a5b2fa1 100644 --- a/libraries/select_lang.lib.php +++ b/libraries/select_lang.lib.php @@ -339,6 +339,11 @@ function PMA_langList() /* We can always speak English */ $result = array('en' => PMA_langDetails('en')); + /* Check for existing directory */ + if (!is_dir($GLOBALS['lang_path'])) { + return $result; + } + /* Open the directory */ $handle = @opendir($GLOBALS['lang_path']); /* This can happen if the kit is English-only */