From cfe2fc8b30e7e5c21452239a36301fdaeffdfd7d Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 03 May 2013 06:33:02 -0400
Subject: [PATCH] Log spellchecker error also in html mode

---
 program/steps/utils/spell_html.inc |    5 +++++
 program/steps/utils/spell.inc      |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/program/steps/utils/spell.inc b/program/steps/utils/spell.inc
index b59fe79..38e4ca2 100644
--- a/program/steps/utils/spell.inc
+++ b/program/steps/utils/spell.inc
@@ -43,7 +43,7 @@
 }
 
 if ($err = $spellchecker->error()) {
-    raise_error(array('code' => 500, 'type' => 'php',
+    rcube::raise_error(array('code' => 500, 'type' => 'php',
         'file' => __FILE__, 'line' => __LINE__,
         'message' => sprintf("Spell check engine error: " . $err)),
         true, false);
diff --git a/program/steps/utils/spell_html.inc b/program/steps/utils/spell_html.inc
index 861e4ba..96b41e2 100644
--- a/program/steps/utils/spell_html.inc
+++ b/program/steps/utils/spell_html.inc
@@ -46,6 +46,11 @@
 }
 
 if ($error = $spellchecker->error()) {
+    rcube::raise_error(array('code' => 500, 'type' => 'php',
+        'file' => __FILE__, 'line' => __LINE__,
+        'message' => sprintf("Spell check engine error: " . $error)),
+        true, false);
+
     echo '{"error":{"errstr":"' . addslashes($error) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}';
     exit;
 }

--
Gitblit v1.9.1