I am working on a Wordpress site and recently I have begun getting this warning:
Warning: preg_match() [function.preg-match]: Unknown modifier '-'
It started when I changed the permalink structure to /%postname%/
, which is needed for BuddyPress to function. If use the default permalink structure, the problem goes away.
Here is the code from the wp-includes/class-wp.php
where the error is occurring:
if ( preg_match("#^$match#", $request_match, $matches) ||
preg_match("#^$match#", urldecode($request_match), $matches) ) {