thomascube
2008-08-15 d4c01cadbdcd871f6d1c289c77dbd399d202aefd
Prevent further errors when the requested dictionary is not available; pspell_new() will trigger a warning, that's enough

1 files modified
3 ■■■■ changed files
program/steps/mail/spell_pspell.inc 3 ●●●● patch | view | raw | blame | history
program/steps/mail/spell_pspell.inc
@@ -39,7 +39,7 @@
    $word = $w[0];
    $pos  = $w[1];
    $len  = strlen($word);
    if (!pspell_check($plink, $word)) {
    if ($plink && !pspell_check($plink, $word)) {
        $suggestions = pspell_suggest($plink, $word);
        $out .= '<c o="'.$pos.'" l="'.$len.'">';
        $out .= implode("\t", $suggestions);
@@ -48,6 +48,7 @@
}
$out .= '</spellresult>';
header("Content-Type: text/xml");
echo $out;
exit;