Subversion Repositories oidplus

Rev

Rev 1321 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1321 Rev 1365
Line 151... Line 151...
151
 
151
 
152
        $errmsg = $e->getMessage();
152
        $errmsg = $e->getMessage();
153
 
153
 
154
        $json_out = array();
154
        $json_out = array();
155
        $json_out['status'] = -2;
155
        $json_out['status'] = -2;
156
        $json_out['error'] = $errmsg;
156
        $json_out['error'] = strip_tags($errmsg);
157
        $out = json_encode($json_out);
157
        $out = json_encode($json_out);
158
 
158
 
159
        if ($out === false) {
159
        if ($out === false) {
160
                // Some modules (like ODBC) might output non-UTF8 data
160
                // Some modules (like ODBC) might output non-UTF8 data
161
                $json_out['error'] = vts_utf8_encode($errmsg);
161
                $json_out['error'] = vts_utf8_encode(strip_tags($errmsg));
162
                $out = json_encode($json_out);
162
                $out = json_encode($json_out);
163
        }
163
        }
164
 
164
 
165
        @header('Content-Type:application/json; charset=utf-8');
165
        @header('Content-Type:application/json; charset=utf-8');
166
 
166