소스 검색

Reverse arguments to array_merge of cusotm config (#8033)

The installer was merging the initial configuration into the custom
configuration, which meant that any keys set in the system configuration
would take precedence over custom configuration. Practically, this meant it
was not possible to preconfigure the database connection via
`config.custom.php`.

This commit reverses the order of the arguments to the `array_merge`
function so that keys in the custom configuration will override keys in the
initial configuration.

See also: https://github.com/FreshRSS/FreshRSS/discussions/8030
Lars Kellogg-Stedman 7 달 전
부모
커밋
0d463b67bd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      cli/do-install.php

+ 1 - 1
cli/do-install.php

@@ -101,7 +101,7 @@ $customConfigPath = DATA_PATH . '/config.custom.php';
 if (file_exists($customConfigPath)) {
 	$customConfig = include $customConfigPath;
 	if (is_array($customConfig) && is_array_keys_string($customConfig)) {
-		$config = array_merge($customConfig, $config);
+		$config = array_merge($config, $customConfig);
 	}
 }