Skip to content

Commit

Permalink
Merge pull request #6283 from Sesquipedalian/updateSettingsFile_remov…
Browse files Browse the repository at this point in the history
…e_context

Removes two errant references to $context in updateSettingsFile()
  • Loading branch information
Sesquipedalian committed Oct 5, 2020
2 parents ade756d + 11366a8 commit 523819a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Subs-Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ function updateSettingsFile($config_vars, $keep_quotes = null, $rebuild = false)

$var_pattern = count($var_pattern) > 1 ? '(?:' . (implode('|', $var_pattern)) . ')' : $var_pattern[0];

$substitutions[$var]['search_pattern'] = '~(?<=^|\s)\h*\$' . preg_quote($var, '~') . '\s*=\s*' . $var_pattern . ';~' . (!empty($context['utf8']) ? 'u' : '');
$substitutions[$var]['search_pattern'] = '~(?<=^|\s)\h*\$' . preg_quote($var, '~') . '\s*=\s*' . $var_pattern . ';~' . (!empty($utf8) ? 'u' : '');
}

// Next create the placeholder or replace_pattern.
Expand Down Expand Up @@ -1198,7 +1198,7 @@ function updateSettingsFile($config_vars, $keep_quotes = null, $rebuild = false)

$placeholder = md5($prefix . $var);

$substitutions[$var]['search_pattern'] = '~(?<=^|\s)\h*\$' . preg_quote($var, '~') . '\s*=\s*' . $var_pattern . ';~' . (!empty($context['utf8']) ? 'u' : '');
$substitutions[$var]['search_pattern'] = '~(?<=^|\s)\h*\$' . preg_quote($var, '~') . '\s*=\s*' . $var_pattern . ';~' . (!empty($utf8) ? 'u' : '');
$substitutions[$var]['placeholder'] = $placeholder;
$substitutions[$var]['replacement'] = '$' . $var . ' = ' . smf_var_export($val, true) . ";";
}
Expand Down

0 comments on commit 523819a

Please sign in to comment.