File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public static function respondToAccountVerify() {
5050 $ responseData = "OK " ;
5151 header ("HTTP/1.1 201 Created " );
5252 header ("Content-type: application/json " );
53- echo json_encode ($ responseData , JSON_PRETTY_PRINT );
53+ echo json_encode ($ responseData , JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR );
5454 }
5555
5656 public static function respondToAccountNew () {
@@ -95,7 +95,7 @@ public static function respondToAccountNew() {
9595 header ("HTTP/1.1 201 Created " );
9696 header ("Content-type: application/json " );
9797 Session::start ($ _POST ['email ' ]);
98- echo json_encode ($ responseData , JSON_PRETTY_PRINT );
98+ echo json_encode ($ responseData , JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR );
9999 }
100100
101101 public static function respondToAccountResetPassword () {
@@ -221,7 +221,7 @@ public static function respondToRegister() {
221221 );
222222 header ("HTTP/1.1 201 Created " );
223223 header ("Content-type: application/json " );
224- echo json_encode ($ responseData , JSON_PRETTY_PRINT );
224+ echo json_encode ($ responseData , JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR );
225225 }
226226
227227 public static function respondToSharing () {
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ public static function respondToRegister() {
145145 );
146146 header ("HTTP/1.1 201 Created " );
147147 header ("Content-type: application/json " );
148- echo json_encode ($ responseData , JSON_PRETTY_PRINT );
148+ echo json_encode ($ responseData , JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR );
149149 }
150150
151151 public static function respondToSharing () {
Original file line number Diff line number Diff line change @@ -161,6 +161,6 @@ public static function respond($response) {
161161 header ($ header . ": " . $ value );
162162 }
163163 }
164- echo json_encode ($ body , JSON_PRETTY_PRINT );
164+ echo json_encode ($ body , JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR );
165165 }
166166 }
You can’t perform that action at this time.
0 commit comments