We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2439391 commit 342ff13Copy full SHA for 342ff13
pfSense-pkg-NetBird/files/usr/local/pkg/netbird/netbird.inc
@@ -55,8 +55,10 @@ function netbird_resync_config()
55
];
56
57
foreach ($config_map as $post_key => [$json_key, $enabled_val]) {
58
- $checked = ($_POST[$post_key] ?? '') === 'on';
59
- $config[$json_key] = ($checked === $enabled_val);
+ if (array_key_exists($post_key, $_POST)) {
+ $checked = $_POST[$post_key] === 'on';
60
+ $config[$json_key] = ($checked === $enabled_val);
61
+ }
62
}
63
64
file_put_contents(NETBIRD_CONFIG, json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
0 commit comments