From d72fca121fcc1602955d9319e872cbf76e8ecf2a Mon Sep 17 00:00:00 2001 From: Artyom Mezin Date: Tue, 22 Oct 2024 12:32:54 +0300 Subject: [PATCH] Annoying output comments fix for json Flex (#3856) --- 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 9d9fc477c..68110a645 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()) { + if ($debugger->enabled() && $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 b93b6f219..5cf838d63 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()) { + if ($debugger->enabled() && $grav['uri']->extension() !== 'json') { $name = $this->getKey() . ' (' . $type . ')'; $output = "\n\n{$output}\n\n"; }