mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 22:27:31 -04:00
fix(file/types): Preserve keys (including numeric-looking ones)
Replace array_merge with array_replace for definitions Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
50a94a35ee
commit
e476a22a50
1 changed files with 1 additions and 1 deletions
|
|
@ -97,7 +97,7 @@ class Detection implements IMimeTypeDetector {
|
|||
if (file_exists($this->customConfigDir . '/' . $fileName)) {
|
||||
$custom = json_decode(file_get_contents($this->customConfigDir . '/' . $fileName), true);
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
$definitions = array_merge($definitions, $custom);
|
||||
$definitions = array_replace($definitions, $custom);
|
||||
} else {
|
||||
$this->logger->warning('Failed to parse ' . $fileName . ': ' . json_last_error_msg());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue