diff --git a/plugin/think-library/src/common.php b/plugin/think-library/src/common.php index 54b90cfff..bcfec241c 100644 --- a/plugin/think-library/src/common.php +++ b/plugin/think-library/src/common.php @@ -415,8 +415,9 @@ if (!function_exists('down_file')) { if (!function_exists('trace_file')) { /** * 输出异常数据到文件. + * @param \Throwable $exception 支持 Exception 与 Error(PHP 7+) */ - function trace_file(Exception $exception): bool + function trace_file(\Throwable $exception): bool { $path = Library::$sapp->getRuntimePath() . 'trace'; if (!is_dir($path)) {