Skip to content

Commit

Permalink
Merge pull request #1662 from whitesoup12/fix-read-setting-regex
Browse files Browse the repository at this point in the history
Update regex in ReadSettingFromFile to parse setting values with spaces.
  • Loading branch information
cpinkham authored Nov 22, 2023
2 parents 8aa7521 + 3dda9b0 commit e566548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function ReadSettingFromFile($settingName, $plugin = "")
}
if (!empty($settingsStr)) {
if (preg_match("/^" . $settingName . "/m", $settingsStr)) {
$result = preg_match("/^" . $settingName . "\s*=(\s*\S*\w*)/m", $settingsStr, $output_array);
$result = preg_match("/^" . $settingName . "\s*=(.+)/m", $settingsStr, $output_array);
if ($result == 0) {
// error_log("The setting " . $settingName . " could not be found in " . $filename);
return false;
Expand Down

0 comments on commit e566548

Please sign in to comment.