summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/utils/spell.inc3
-rw-r--r--program/steps/utils/spell_html.inc2
2 files changed, 4 insertions, 1 deletions
diff --git a/program/steps/utils/spell.inc b/program/steps/utils/spell.inc
index c8807e32f..696fa6005 100644
--- a/program/steps/utils/spell.inc
+++ b/program/steps/utils/spell.inc
@@ -37,6 +37,9 @@ if ($learn_word) {
$spellchecker->add_word($data);
$result = '<?xml version="1.0" encoding="'.RCUBE_CHARSET.'"?><learnwordresult></learnwordresult>';
}
+else if (empty($data)) {
+ $result = '<?xml version="1.0" encoding="'.RCUBE_CHARSET.'"?><spellresult charschecked="0"></spellresult>';
+}
else {
$spellchecker->check($data);
$result = $spellchecker->get_xml();
diff --git a/program/steps/utils/spell_html.inc b/program/steps/utils/spell_html.inc
index 27b14acef..5935dc13f 100644
--- a/program/steps/utils/spell_html.inc
+++ b/program/steps/utils/spell_html.inc
@@ -35,7 +35,7 @@ $result['id'] = $request['id'];
$spellchecker = new rcube_spellchecker($lang);
if ($request['method'] == 'checkWords') {
- $result['result'] = $spellchecker->get_words($data);
+ $result['result'] = empty($data) ? array() : $spellchecker->get_words($data);
}
else if ($request['method'] == 'getSuggestions') {
$result['result'] = $spellchecker->get_suggestions($data);