Over-escaping breaking wildcard domain matching
gefangenimnetz opened this issue · comments
gefangenimnetz commented
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)
It should look like this:
$match = '/' . str_replace('\*', '([^.]+)', preg_quote($domain_name, '/')) . '/';
Regards