Commit 10a451fe authored by Nigel McNie's avatar Nigel McNie
Browse files

Throw a proper exception if cannot get a language directory listing

parent b6eb041d
...@@ -353,7 +353,7 @@ function get_languages() { ...@@ -353,7 +353,7 @@ function get_languages() {
$langs = array(); $langs = array();
$langbase = get_config('docroot') . 'lang/'; $langbase = get_config('docroot') . 'lang/';
if (!$langdir = opendir($langbase)) { if (!$langdir = opendir($langbase)) {
throw new Exception('Unable to read language directory '.$langbase); throw new SystemException('Unable to read language directory '.$langbase);
} }
while (false !== ($subdir = readdir($langdir))) { while (false !== ($subdir = readdir($langdir))) {
$langfile = $langbase . $subdir . '/langconfig.php'; $langfile = $langbase . $subdir . '/langconfig.php';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment