You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api.php
+14
Original file line number
Diff line number
Diff line change
@@ -1270,6 +1270,15 @@ protected function exitWith404($type) {
1270
1270
}
1271
1271
}
1272
1272
1273
+
protectedfunctionexitWith400($type) {
1274
+
if (isset($_SERVER['REQUEST_METHOD'])) {
1275
+
header('Content-Type:',true,400);
1276
+
die("The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. ($type)");
1277
+
} else {
1278
+
thrownew \Exception("Bad request ($type)");
1279
+
}
1280
+
}
1281
+
1273
1282
protectedfunctionexitWith422($object) {
1274
1283
if (isset($_SERVER['REQUEST_METHOD'])) {
1275
1284
header('Content-Type:',true,422);
@@ -1684,6 +1693,11 @@ protected function retrieveInputs($data) {
0 commit comments