summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/Roundcube/rcube_spellchecker.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_spellchecker.php b/program/lib/Roundcube/rcube_spellchecker.php
index 5b77bda02..3d15eb660 100644
--- a/program/lib/Roundcube/rcube_spellchecker.php
+++ b/program/lib/Roundcube/rcube_spellchecker.php
@@ -226,7 +226,18 @@ class rcube_spellchecker
else {
$word = mb_substr($this->content, $item[1], $item[2], RCUBE_CHARSET);
}
- $result[$word] = is_array($item[4]) ? implode("\t", $item[4]) : $item[4];
+
+ if (is_array($item[4])) {
+ $suggestions = $item[4];
+ }
+ else if (empty($item[4])) {
+ $suggestions = array();
+ }
+ else {
+ $suggestions = explode("\t", $item[4]);
+ }
+
+ $result[$word] = $suggestions;
}
return $result;