This commit is contained in:
as2252258@163.com
2021-04-04 03:01:12 +08:00
parent 59a8974672
commit c7e059f104
14 changed files with 1230 additions and 1230 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ abstract class BaseApplication extends Service
foreach ($config as $key => $value) {
Config::set($key, $value);
}
if ($storage = Config::get('storage', false, 'storage')) {
if ($storage = Config::get('storage', 'storage')) {
if (!str_contains($storage, APP_PATH)) {
$storage = APP_PATH . $storage . '/';
}
+1 -1
View File
@@ -53,7 +53,7 @@ class Config extends Component
* @return mixed
* @throws
*/
public static function get($key, $try = FALSE, $default = null): mixed
public static function get($key, $default = null, $try = FALSE): mixed
{
$instance = Snowflake::app()->getConfig()->getData();
if (!str_contains($key, '.')) {
+2 -2
View File
@@ -40,8 +40,8 @@ abstract class Pool extends Component
*/
private function getClearTime(): array
{
$firstClear = Config::get('pool.clear.start', false, 600);
$lastClear = Config::get('pool.clear.end', false, 300);
$firstClear = Config::get('pool.clear.start', 600);
$lastClear = Config::get('pool.clear.end', 300);
return [$firstClear, $lastClear];
}