浏览代码

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);
 	}
 }