mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 18:48:14 -05:00
fix: correct konw issues
This commit is contained in:
parent
da635d0b3b
commit
8a75523796
@ -142,7 +142,7 @@ class Server extends Model
|
||||
private function castValueWithConfig($value, array $config)
|
||||
{
|
||||
if ($value === null) {
|
||||
return $config['default'];
|
||||
return $config['default'] ?? null;
|
||||
}
|
||||
|
||||
return match ($config['type']) {
|
||||
@ -152,7 +152,7 @@ class Server extends Model
|
||||
'array' => (array) $value,
|
||||
'object' => is_array($value) ?
|
||||
$this->castSettingsWithConfig($value, $config['fields']) :
|
||||
$config['default'],
|
||||
$config['default'] ?? null,
|
||||
default => $value
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user