Changeset 9ed374b in github


Ignore:
Timestamp:
Jun 30, 2010 6:14:41 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
b8d4feb
Parents:
4eb8493
Message:
  • fix for empty suggestions result
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/utils/spell_html_googie.inc

    rf4f6291 r9ed374b  
    9494} 
    9595else if ($request['method'] == 'getSuggestions') { 
    96     $suggestions = explode("\t", $matches[0][4]); 
    97     if (sizeof($suggestions)>MAX_SUGGESTIONS) 
    98         $suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS); 
    99     $result['result'] = $suggestions; 
     96    if ($matches[0][4]) { 
     97        $suggestions = explode("\t", $matches[0][4]); 
     98        if (sizeof($suggestions)>MAX_SUGGESTIONS) 
     99            $suggestions = array_slice($suggestions, 0, MAX_SUGGESTIONS); 
     100        $result['result'] = $suggestions; 
     101    } 
     102    else 
     103        $result['result'] = array(); 
    100104} 
    101105 
Note: See TracChangeset for help on using the changeset viewer.