From 7fface125e7db1e7ab47bdfbda5306fa16ea2486 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 25 Apr 2014 09:55:00 +0200 Subject: Fix error when spell-checking an empty text (#1489831) --- program/lib/Roundcube/rcube_spellcheck_googie.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'program/lib/Roundcube/rcube_spellcheck_googie.php') diff --git a/program/lib/Roundcube/rcube_spellcheck_googie.php b/program/lib/Roundcube/rcube_spellcheck_googie.php index 3777942a6..f9e450fdd 100644 --- a/program/lib/Roundcube/rcube_spellcheck_googie.php +++ b/program/lib/Roundcube/rcube_spellcheck_googie.php @@ -56,6 +56,10 @@ class rcube_spellcheck_googie extends rcube_spellcheck_engine { $this->content = $text; + if (empty($text)) { + return $this->matches = array(); + } + // spell check uri is configured $url = rcube::get_instance()->config->get('spellcheck_uri'); -- cgit v1.2.3