From 773919b17a9a12f45adf848da34365b2195c53e0 Mon Sep 17 00:00:00 2001 From: julmis Date: Sat, 22 Jan 2005 11:19:20 +0000 Subject: [PATCH] Added $CFG->aspellpath check in editor_get_dictionaries function. --- admin/editor.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/admin/editor.php b/admin/editor.php index d50b394bb2..9d3f75b0a7 100644 --- a/admin/editor.php +++ b/admin/editor.php @@ -154,11 +154,19 @@ function reset_to_defaults () { function editor_get_dictionaries () { /// Get all installed dictionaries in the system + global $CFG; + error_reporting(E_ALL); // for debug, final version shouldn't have this... clearstatcache(); - $strerror = ''; + $strerror = ''; + + // If aspellpath isn't set don't even bother ;-) + if (empty($CFG->aspellpath)) { + return $strerror = 'Empty aspell path!'; + } + // Do we have access to popen function? if (!function_exists('popen')) { return $strerror = "Popen function disabled!"; exit; -- 2.39.5