Victor Benincasa
2013-06-25 093a3d9e7df58e2bd41db2caf6a348bf60c9ec8a
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.
1 files modified
2 ■■■ changed files
program/lib/Roundcube/rcube_spellchecker.php 2 ●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_spellchecker.php
@@ -377,7 +377,7 @@
        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";
        }