From 7fface125e7db1e7ab47bdfbda5306fa16ea2486 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 25 Apr 2014 03:56:22 -0400
Subject: [PATCH] Fix error when spell-checking an empty text (#1489831)

---
 program/steps/utils/spell_html.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/steps/utils/spell_html.inc b/program/steps/utils/spell_html.inc
index 27b14ac..5935dc1 100644
--- a/program/steps/utils/spell_html.inc
+++ b/program/steps/utils/spell_html.inc
@@ -35,7 +35,7 @@
 $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);

--
Gitblit v1.9.1