From 112c2cc4f367d250add15a8db4d594fe25767be9 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Fri, 28 Jun 2024 11:24:03 +0800 Subject: [PATCH] * [misc] Die without any message if an error triggered in non-debug mode. --- framework/base/router.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 092fac319d..a804abf700 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -3204,7 +3204,7 @@ class baseRouter if(preg_match('/[^\x00-\x80]/', $message)) $message = helper::convertEncoding($message, 'gbk'); /* Only show error when debug is open. */ - if(!$this->config->debug) helper::end(); + if(!$this->config->debug) die; $log = (new Exception())->getTraceAsString(); /* Print a backtrace like debug_print_backtrace(). */ $log = str_replace($this->basePath, '', $log); /* Remove the base path from the backtrace. */