summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/utils
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-30 10:14:41 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-30 10:14:41 +0000
commit64679b30ed0b5ae60fff9f151c7d90fba7a9b33b (patch)
tree69d67c9d43067aa18285420c38d47cb2a573a182 /roundcubemail/program/steps/utils
parent60096e5d6132eb45aaf542c8c646ef677daf5104 (diff)
- fix for empty suggestions result
git-svn-id: https://svn.roundcube.net/trunk@3797 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/utils')
-rw-r--r--roundcubemail/program/steps/utils/spell_html_googie.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/utils/spell_html_googie.inc b/roundcubemail/program/steps/utils/spell_html_googie.inc
index 292f303a3..ee9079dce 100644
--- a/roundcubemail/program/steps/utils/spell_html_googie.inc
+++ b/roundcubemail/program/steps/utils/spell_html_googie.inc
@@ -93,10 +93,14 @@ if ($request['method'] == 'checkWords') {
$result['result'][] = mb_substr($wordstr, $matches[$i][1], $matches[$i][2], RCMAIL_CHARSET);
}
else if ($request['method'] == 'getSuggestions') {
- $suggestions = explode("\t", $matches[0][4]);
- if (sizeof($suggestions)>MAX_SUGGESTIONS)
- $suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS);
- $result['result'] = $suggestions;
+ if ($matches[0][4]) {
+ $suggestions = explode("\t", $matches[0][4]);
+ if (sizeof($suggestions)>MAX_SUGGESTIONS)
+ $suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS);
+ $result['result'] = $suggestions;
+ }
+ else
+ $result['result'] = array();
}
// send output