From 602d97200339f4165b0a5d90ed957bb05d9ee814 Mon Sep 17 00:00:00 2001 From: Osahenrumwen Aigbogun Date: Mon, 9 Dec 2024 11:48:50 +0100 Subject: [PATCH] Cli mode was being overwritten --- src/Core/CoreException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/CoreException.php b/src/Core/CoreException.php index 8a20fed..52155fe 100644 --- a/src/Core/CoreException.php +++ b/src/Core/CoreException.php @@ -226,8 +226,8 @@ private function container(?string $title, ?string $body, array $other = []): ar $show_internal_trace = $other['show_internal_trace'] ?? self::$show_internal_trace; $cli_mode = LayConfig::get_mode() === LayMode::CLI; - $use_json = $cli_mode ? false : $this->throw_as_json; - $use_json = $use_json ?: !isset(LayConfig::user_agent()['browser']); + $use_json = $this->throw_as_json ?: !isset(LayConfig::user_agent()['browser']); + $use_json = $cli_mode ? false : $use_json; if (!empty(@$other['raw'])) {