Skip to content

Commit

Permalink
Fix #29 - escape * wildcard match
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrjones committed Aug 23, 2022
1 parent 6199943 commit 923c69c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-config.load.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function s24_load_environment_config() {

$wildcard = (is_string($domain) && strpos($domain, '*') !== false) ? true : false;
if ($wildcard) {
$match = '/' . str_replace('*', '([^.]+)', preg_quote($domain, '/')) . '/';
$match = '/' . str_replace('\*', '([^.]+)', preg_quote($domain, '/')) . '/';
if (preg_match($match, $hostname, $m)) {
if (!defined('WP_ENV')) {
define('WP_ENV', preg_replace('/[^a-z]/', '', $environment));
Expand Down

0 comments on commit 923c69c

Please sign in to comment.