mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Error类的register方法
This commit is contained in:
@@ -304,6 +304,9 @@ class App
|
|||||||
|
|
||||||
// 是否调试模式
|
// 是否调试模式
|
||||||
self::$debug = Config::get('app_debug');
|
self::$debug = Config::get('app_debug');
|
||||||
|
if (!self::$debug) {
|
||||||
|
ini_set('display_errors', 'Off');
|
||||||
|
}
|
||||||
|
|
||||||
// 注册根命名空间
|
// 注册根命名空间
|
||||||
if (!empty($config['root_namespace'])) {
|
if (!empty($config['root_namespace'])) {
|
||||||
|
|||||||
@@ -29,10 +29,6 @@ class Error
|
|||||||
set_error_handler([__CLASS__, 'appError']);
|
set_error_handler([__CLASS__, 'appError']);
|
||||||
set_exception_handler([__CLASS__, 'appException']);
|
set_exception_handler([__CLASS__, 'appException']);
|
||||||
register_shutdown_function([__CLASS__, 'appShutdown']);
|
register_shutdown_function([__CLASS__, 'appShutdown']);
|
||||||
|
|
||||||
if (!App::$debug) {
|
|
||||||
ini_set('display_errors', 'Off');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user