mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Config: use JSON_THROW_ON_ERROR for encoding
This commit is contained in:
parent
1a046c6cd5
commit
8e8cee45b8
@ -53,6 +53,7 @@ use function yaml_parse;
|
||||
use const CASE_LOWER;
|
||||
use const JSON_BIGINT_AS_STRING;
|
||||
use const JSON_PRETTY_PRINT;
|
||||
use const JSON_THROW_ON_ERROR;
|
||||
|
||||
/**
|
||||
* Config Class for simple config manipulation of multiple formats.
|
||||
@ -212,7 +213,7 @@ class Config{
|
||||
$content = self::writeProperties($this->config);
|
||||
break;
|
||||
case Config::JSON:
|
||||
$content = json_encode($this->config, $this->jsonOptions);
|
||||
$content = json_encode($this->config, $this->jsonOptions | JSON_THROW_ON_ERROR);
|
||||
break;
|
||||
case Config::YAML:
|
||||
$content = yaml_emit($this->config, YAML_UTF8_ENCODING);
|
||||
|
Loading…
x
Reference in New Issue
Block a user