wordpress-multi-env-config
wordpress-multi-env-config copied to clipboard
Over-escaping breaking wildcard domain matching
Warning: preg_match(): Compilation failed: unmatched parentheses at offset 7 in /app/public/wp-config.load.php on line 88
The '*' should be escaped to prevent over-escaping with preg_quote
(otherwise the parenthesis of str_replace would be escaped)
https://github.com/studio24/wordpress-multi-env-config/blob/b3362b947d0cbec9ca0c84db56376d26cca32c8e/wp-config.load.php#L87
It should look like this:
$match = '/' . str_replace('\*', '([^.]+)', preg_quote($domain_name, '/')) . '/';
Regards