From d4c01cadbdcd871f6d1c289c77dbd399d202aefd Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Fri, 15 Aug 2008 12:10:29 -0400 Subject: [PATCH] Prevent further errors when the requested dictionary is not available; pspell_new() will trigger a warning, that's enough --- program/steps/mail/spell_pspell.inc | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/program/steps/mail/spell_pspell.inc b/program/steps/mail/spell_pspell.inc index ad637e8..ea5907a 100644 --- a/program/steps/mail/spell_pspell.inc +++ b/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; -- Gitblit v1.9.1