Skip to content

Commit 23db625

Browse files
fix(file/types): Preserve keys (including numeric-looking ones)
Replace array_merge with array_replace for definitions Signed-off-by: Josh <[email protected]>
1 parent 7e493ac commit 23db625

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Files/Type/Detection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function loadCustomDefinitions(string $fileName, array $definitions): ar
9797
if (file_exists($this->customConfigDir . '/' . $fileName)) {
9898
$custom = json_decode(file_get_contents($this->customConfigDir . '/' . $fileName), true);
9999
if (json_last_error() === JSON_ERROR_NONE) {
100-
$definitions = array_merge($definitions, $custom);
100+
$definitions = array_replace($definitions, $custom);
101101
} else {
102102
$this->logger->warning('Failed to parse ' . $fileName . ': ' . json_last_error_msg());
103103
}

0 commit comments

Comments
 (0)