summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Benincasa <vbenincasa@gmail.com>2013-06-25 03:39:23 -0300
committerVictor Benincasa <vbenincasa@gmail.com>2013-06-25 03:39:23 -0300
commit093a3d9e7df58e2bd41db2caf6a348bf60c9ec8a (patch)
treec9c9bb42162e6f7734b0115f07289668f6aca8c2
parent2787fbe5b6f015b5ce7c86185cc6876ec892b483 (diff)
Fix improper error checking
Currently all (HTML/TEXT) spell checking logs an error (due commit b15cc7d) and HTML spell checking doesn't work (due commit cfe2fc8). Fix: ignore error="0" value from the returned XML as it isn't an error.
-rw-r--r--program/lib/Roundcube/rcube_spellchecker.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_spellchecker.php b/program/lib/Roundcube/rcube_spellchecker.php
index 60aec500f..bd6cb6759 100644
--- a/program/lib/Roundcube/rcube_spellchecker.php
+++ b/program/lib/Roundcube/rcube_spellchecker.php
@@ -377,7 +377,7 @@ class rcube_spellchecker
if (!$store) {
$this->error = "Empty result from spelling engine";
}
- else if (preg_match('/<spellresult error="([^"]+)"/', $store, $m)) {
+ else if (preg_match('/<spellresult error="((?!0")[^"]+)"/', $store, $m)) {
$this->error = "Error code $m[1] returned";
}