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.
pull/73/merge
Victor Benincasa 12 years ago
parent 2787fbe5b6
commit 093a3d9e7d

@ -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";
}

Loading…
Cancel
Save