From 6fa63197a0104ce2c5902a7ecb65da51a9597f96 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 22 Oct 2024 14:10:18 +0100 Subject: [PATCH] Fallback to extension on Flex-Objects json check --- system/src/Grav/Framework/Flex/FlexCollection.php | 2 +- system/src/Grav/Framework/Flex/FlexObject.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Framework/Flex/FlexCollection.php b/system/src/Grav/Framework/Flex/FlexCollection.php index cfa91008e..25dcd9d76 100644 --- a/system/src/Grav/Framework/Flex/FlexCollection.php +++ b/system/src/Grav/Framework/Flex/FlexCollection.php @@ -440,7 +440,7 @@ class FlexCollection extends ObjectCollection implements FlexCollectionInterface ] + $context ); - if ($debugger->enabled() && $grav['uri']->getContentType() !== 'application/json') { + if ($debugger->enabled() && ($grav['uri']->getContentType() !== 'application/json' || $grav['uri']->extension() !== '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 58bd7eb4d..01295fec9 100644 --- a/system/src/Grav/Framework/Flex/FlexObject.php +++ b/system/src/Grav/Framework/Flex/FlexObject.php @@ -627,7 +627,7 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface ] + $context ); - if ($debugger->enabled() && $grav['uri']->getContentType() !== 'application/json') { + if ($debugger->enabled() && ($grav['uri']->getContentType() !== 'application/json' || $grav['uri']->extension() !== 'json')) { $name = $this->getKey() . ' (' . $type . ')'; $output = "\n\n{$output}\n\n"; }