summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-15 16:10:29 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-15 16:10:29 +0000
commit8dd0a30eb2d5cbd3f4e2b5bd04ec8a10bfd783f7 (patch)
treee1c5d23bc40f9b6787efedf6eac4dcadde092d20 /roundcubemail/program
parentde5b04c5ba495d7bdc3f807cbedcdb7b377d5e00 (diff)
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
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/mail/spell_pspell.inc3
1 files changed, 2 insertions, 1 deletions
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 .= '<c o="'.$pos.'" l="'.$len.'">';
$out .= implode("\t", $suggestions);
@@ -48,6 +48,7 @@ foreach ($words as $w) {
}
$out .= '</spellresult>';
+header("Content-Type: text/xml");
echo $out;
exit;