diff --git a/system/src/Grav/Framework/Flex/FlexCollection.php b/system/src/Grav/Framework/Flex/FlexCollection.php index 68110a6451..cfa91008e9 100644 --- a/system/src/Grav/Framework/Flex/FlexCollection.php +++ b/system/src/Grav/Framework/Flex/FlexCollection.php @@ -440,7 +440,7 @@ public function render(string $layout = null, array $context = []) ] + $context ); - if ($debugger->enabled() && $grav['uri']->extension() !== 'json') { + if ($debugger->enabled() && $grav['uri']->getContentType() !== 'application/json') { $output = "\n\n{$output}\n\n"; } diff --git a/system/src/Grav/Framework/Flex/FlexObject.php b/system/src/Grav/Framework/Flex/FlexObject.php index 5cf838d63b..58bd7eb4da 100644 --- a/system/src/Grav/Framework/Flex/FlexObject.php +++ b/system/src/Grav/Framework/Flex/FlexObject.php @@ -627,7 +627,7 @@ public function render(string $layout = null, array $context = []) ] + $context ); - if ($debugger->enabled() && $grav['uri']->extension() !== 'json') { + if ($debugger->enabled() && $grav['uri']->getContentType() !== 'application/json') { $name = $this->getKey() . ' (' . $type . ')'; $output = "\n\n{$output}\n\n"; }