From d4c01cadbdcd871f6d1c289c77dbd399d202aefd Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 15 Aug 2008 16:10:29 +0000 Subject: 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 file changed, 2 insertions(+), 1 deletion(-) (limited to 'program/steps') diff --git a/program/steps/mail/spell_pspell.inc b/program/steps/mail/spell_pspell.inc index ad637e85b..ea5907a0d 100644 --- a/program/steps/mail/spell_pspell.inc +++ b/program/steps/mail/spell_pspell.inc @@ -39,7 +39,7 @@ foreach ($words as $w) { $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 .= ''; $out .= implode("\t", $suggestions); @@ -48,6 +48,7 @@ foreach ($words as $w) { } $out .= ''; +header("Content-Type: text/xml"); echo $out; exit; -- cgit v1.2.3