logic fix

This commit is contained in:
Andy Miller
2024-10-22 15:29:47 +01:00
parent 6fa63197a0
commit e2257a9783
2 changed files with 4 additions and 2 deletions

View File

@@ -440,7 +440,8 @@ class FlexCollection extends ObjectCollection implements FlexCollectionInterface
] + $context
);
if ($debugger->enabled() && ($grav['uri']->getContentType() !== 'application/json' || $grav['uri']->extension() !== 'json')) {
if ($debugger->enabled() &&
!($grav['uri']->getContentType() === 'application/json' || $grav['uri']->extension() === 'json')) {
$output = "\n<! START {$type} collection >\n{$output}\n<! END {$type} collection >\n";
}

View File

@@ -627,7 +627,8 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
] + $context
);
if ($debugger->enabled() && ($grav['uri']->getContentType() !== 'application/json' || $grav['uri']->extension() !== 'json')) {
if ($debugger->enabled() &&
!($grav['uri']->getContentType() === 'application/json' || $grav['uri']->extension() === 'json')) {
$name = $this->getKey() . ' (' . $type . ')';
$output = "\n<! START {$name} object >\n{$output}\n<! END {$name} object >\n";
}