From dcb588e02d520e2fca4bcf3634a6129b630aac8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 27 Jul 2021 14:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/function.php b/function.php index 937ce057..ca0cc702 100644 --- a/function.php +++ b/function.php @@ -843,7 +843,7 @@ if (!function_exists('jTraceEx')) { * @param null $seen * @return string */ - function jTraceEx($e, $seen = null): string + function jTraceEx($e, $seen = null, $toHtml = false): string { $starter = $seen ? 'Caused by: ' : ''; $result = array(); @@ -866,9 +866,9 @@ if (!function_exists('jTraceEx')) { $file = array_key_exists('file', $value) ? $value['file'] : 'Unknown Source'; $line = array_key_exists('file', $value) && array_key_exists('line', $value) && $value['line'] ? $value['line'] : null; } - $result = join("\n", $result); + $result = join($toHtml ? "
" : "\n", $result); if ($prev) { - $result .= "\n" . jTraceEx($prev, $seen); + $result .= ($toHtml ? "
" : "\n") . jTraceEx($prev, $seen, $toHtml); } return $result;