summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-08-15 16:10:29 +0000
committerthomascube <thomas@roundcube.net>2008-08-15 16:10:29 +0000
commitd4c01cadbdcd871f6d1c289c77dbd399d202aefd (patch)
tree9700c2c991d1323c05ce19c235e9546d29d64382 /program/steps/mail
parent5d2b7fd387bd887be957d9221c66a030b374938b (diff)
Prevent further errors when the requested dictionary is not available; pspell_new() will trigger a warning, that's enough
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/spell_pspell.inc3
1 files changed, 2 insertions, 1 deletions
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 .= '<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;