We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e0353 commit 2131b85Copy full SHA for 2131b85
plugin/routes.php
@@ -14,7 +14,7 @@
14
'action' => function () {
15
$headers = kirby()->request()->headers();
16
$formData = kirby()->request()->data();
17
- $shouldReturnJson = ($headers['X-Return-Type'] === 'json');
+ $shouldReturnJson = (array_key_exists('X-Return-Type', $headers) && $headers['X-Return-Type'] === 'json');
18
19
$page = page($formData['pageUuid']);
20
0 commit comments