mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-19 00:39:53 +02:00
fix: discard empty lines in whitelist.txt (#3507)
This commit is contained in:
parent
ef0b86968c
commit
b594ad2de3
1 changed files with 3 additions and 3 deletions
|
@ -109,11 +109,11 @@ final class Configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(__DIR__ . '/../whitelist.txt')) {
|
if (file_exists(__DIR__ . '/../whitelist.txt')) {
|
||||||
$whitelist = trim(file_get_contents(__DIR__ . '/../whitelist.txt'));
|
$enabledBridges = trim(file_get_contents(__DIR__ . '/../whitelist.txt'));
|
||||||
if ($whitelist === '*') {
|
if ($enabledBridges === '*') {
|
||||||
self::setConfig('system', 'enabled_bridges', ['*']);
|
self::setConfig('system', 'enabled_bridges', ['*']);
|
||||||
} else {
|
} else {
|
||||||
self::setConfig('system', 'enabled_bridges', explode("\n", $whitelist));
|
self::setConfig('system', 'enabled_bridges', array_filter(explode("\n", $enabledBridges)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue