Skip to content

Commit

Permalink
Removes two errant references to $context in updateSettingsFile()
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
  • Loading branch information
Sesquipedalian committed Oct 1, 2020
1 parent 93258d2 commit 11366a8
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 11366a8

Please sign in to comment.