mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修正classmap中遗漏think\debug\Trace的路径 (#179)
* 修正classmap中遗漏think\debug\trace\Html和think\debug\trace\Console的路径 * 修正classmap中遗漏think\debug\Trace的路径 * 判断trace类型类是否存在
This commit is contained in:
@@ -56,6 +56,9 @@ return [
|
|||||||
'think\db\builder\Sqlsrv' => CORE_PATH . 'db' . DS . 'builder' . DS . 'Sqlsrv' . EXT,
|
'think\db\builder\Sqlsrv' => CORE_PATH . 'db' . DS . 'builder' . DS . 'Sqlsrv' . EXT,
|
||||||
'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT,
|
'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT,
|
||||||
'think\Debug' => CORE_PATH . 'Debug' . EXT,
|
'think\Debug' => CORE_PATH . 'Debug' . EXT,
|
||||||
|
'think\debug\Trace' => CORE_PATH . 'debug' . DS . 'Trace' . EXT,
|
||||||
|
'think\debug\trace\Html' => CORE_PATH . 'debug' . DS . 'trace' . DS . 'Html' . EXT,
|
||||||
|
'think\debug\trace\Console' => CORE_PATH . 'debug' . DS . 'trace' . DS . 'Console' . EXT,
|
||||||
'think\Error' => CORE_PATH . 'Error' . EXT,
|
'think\Error' => CORE_PATH . 'Error' . EXT,
|
||||||
'think\Exception' => CORE_PATH . 'Exception' . EXT,
|
'think\Exception' => CORE_PATH . 'Exception' . EXT,
|
||||||
'think\exception\ClassNotFoundException' => CORE_PATH . 'exception' . DS . 'ClassNotFoundException' . EXT,
|
'think\exception\ClassNotFoundException' => CORE_PATH . 'exception' . DS . 'ClassNotFoundException' . EXT,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
namespace think\debug;
|
namespace think\debug;
|
||||||
|
|
||||||
use think\Config;
|
use think\Config;
|
||||||
|
use think\exception\ClassNotFoundException;
|
||||||
use think\Log;
|
use think\Log;
|
||||||
use think\Request;
|
use think\Request;
|
||||||
use think\Response;
|
use think\Response;
|
||||||
@@ -31,7 +32,11 @@ class Trace
|
|||||||
|
|
||||||
$class = false !== strpos($type, '\\') ? $type : '\\think\\debug\\trace\\' . ucwords($type);
|
$class = false !== strpos($type, '\\') ? $type : '\\think\\debug\\trace\\' . ucwords($type);
|
||||||
unset($config['type']);
|
unset($config['type']);
|
||||||
$trace = new $class($config);
|
if(class_exists($class)) {
|
||||||
|
$trace = new $class($config);
|
||||||
|
} else {
|
||||||
|
throw new ClassNotFoundException('class not exists:' . $class, $class);
|
||||||
|
}
|
||||||
|
|
||||||
if ($response instanceof Redirect) {
|
if ($response instanceof Redirect) {
|
||||||
//TODO 记录
|
//TODO 记录
|
||||||
|
|||||||
Reference in New Issue
Block a user