[Svn] r3797 - trunk/roundcubemail/program/steps/utils

trac at roundcube.net trac at roundcube.net
Wed Jun 30 12:14:41 CEST 2010


Author: alec
Date: 2010-06-30 05:14:41 -0500 (Wed, 30 Jun 2010)
New Revision: 3797

Modified:
   trunk/roundcubemail/program/steps/utils/spell_html_googie.inc
Log:
- fix for empty suggestions result


Modified: trunk/roundcubemail/program/steps/utils/spell_html_googie.inc
===================================================================
--- trunk/roundcubemail/program/steps/utils/spell_html_googie.inc	2010-06-30 10:00:06 UTC (rev 3796)
+++ trunk/roundcubemail/program/steps/utils/spell_html_googie.inc	2010-06-30 10:14:41 UTC (rev 3797)
@@ -93,10 +93,14 @@
         $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

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list