Reputation: 1
Warning: preg_match() [function.preg-match]: Compilation failed: unmatched parentheses at offset 3 in /home/watchit/public_html/wp-includes/class-wp.php on line 201
for this:
if ( preg_match("#^$match#", $request_match, $matches) ||
changed to this:
if ( preg_match("#^$match#", $request_match, $matches)) ||
and got this:
Parse error: syntax error, unexpected T_BOOLEAN_OR in /home/watchit/public_html/wp-includes/class-wp.php on line 201
Upvotes: 0
Views: 1877
Reputation: 4455
Your OR operator ( || ) needs to be part of the if clause, so
if ( preg_match("#^$match#", $request_match, $matches)) ||
Needs to become
if ( preg_match("#^$match#", $request_match, $matches) || your other conditions ){
Upvotes: 1
Reputation: 70500
if ( preg_match("#^".preg_quote($match,'#'),"#", $request_match, $matches) ||
Note also I removed the extra )
before ||
Upvotes: 4