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 441e2c8d34
commit 8d1105fe73

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':