We have to print/echo when outputting json (thanks hannes)

This commit is contained in:
Mikael Nordfeldth 2015-12-14 21:29:39 +01:00
parent 5b847eff12
commit d659e0aaf9

View File

@ -1490,7 +1490,7 @@ class Action extends HTMLOutputter // lawsuit
} }
$this->initDocument('json'); $this->initDocument('json');
$error_array = array('error' => $msg, 'request' => $_SERVER['REQUEST_URI']); $error_array = array('error' => $msg, 'request' => $_SERVER['REQUEST_URI']);
$this->text(json_encode($error_array)); print(json_encode($error_array));
$this->endDocument('json'); $this->endDocument('json');
break; break;
case 'text': case 'text':