summaryrefslogtreecommitdiff
path: root/program/steps/utils/spell.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-25 09:55:00 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-25 09:56:22 +0200
commit7fface125e7db1e7ab47bdfbda5306fa16ea2486 (patch)
treec7d6e5b2c7eb301617c26e9e304481c606b77cf1 /program/steps/utils/spell.inc
parent115ba30dcd5efce3cd2647847bcc52d5324fcead (diff)
Fix error when spell-checking an empty text (#1489831)
Diffstat (limited to 'program/steps/utils/spell.inc')
-rw-r--r--program/steps/utils/spell.inc3
1 files changed, 3 insertions, 0 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();