From 8dd0a30eb2d5cbd3f4e2b5bd04ec8a10bfd783f7 Mon Sep 17 00:00:00 2001 From: thomasb 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 git-svn-id: https://svn.roundcube.net/trunk@1650 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/mail/spell_pspell.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roundcubemail/program/steps/mail/spell_pspell.inc b/roundcubemail/program/steps/mail/spell_pspell.inc index ad637e85b..ea5907a0d 100644 --- a/roundcubemail/program/steps/mail/spell_pspell.inc +++ b/roundcubemail/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