modify
This commit is contained in:
@@ -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 . '/';
|
||||
}
|
||||
|
||||
@@ -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, '.')) {
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user