mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Config: Try to coerce types, similar to YAML
This commit is contained in:
parent
4b00465e24
commit
90800a4124
@ -557,6 +557,13 @@ class Config{
|
||||
case "no":
|
||||
$v = false;
|
||||
break;
|
||||
default:
|
||||
$v = match($v){
|
||||
(string) ((int) $v) => (int) $v,
|
||||
(string) ((float) $v) => (float) $v,
|
||||
default => $v,
|
||||
};
|
||||
break;
|
||||
}
|
||||
if(isset($result[$k])){
|
||||
\GlobalLogger::get()->debug("[Config] Repeated property " . $k . " on file " . $this->file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user