From 55556bab75d70341e3ec00575248238d0e6ae0c9 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 3 Feb 2014 02:26:29 +0100 Subject: [PATCH] use json instead of raw error msg output --- ajax/otpoll.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ajax/otpoll.php b/ajax/otpoll.php index e3d7c0af..64706929 100644 --- a/ajax/otpoll.php +++ b/ajax/otpoll.php @@ -109,8 +109,8 @@ try{ \OCP\JSON::success($response); } catch (BadRequestException $e){ header('HTTP/1.1 400: BAD REQUEST'); - print(""); - print($e->getBody()); - print(""); + \OCP\JSON::error( array( + 'message' => $e->getBody(), + )); } exit();