Thread:Extension talk:Realnames/Unknown Modifier Error on Subpages

I am running Realnames v0.3.1 with the default options.

When navigating to a sub-page of a user's page (e.g. /User:somename/Subpage) an 'Unknown modifier' error is generated by preg_replace_callback in lookForBare.

I have fixed this in our installation by changing the delimiters for the regex from '/' to '~' in the following two places in Realnames.body.php:

268 - $out->setPagetitle(static::lookForBare($out->getPageTitle,'/'.static::getNamespacePrefixes.'\s*('.$title->getText.')(?:\/.+)?/')); 268 + $out->setPagetitle(static::lookForBare($out->getPageTitle,'~'.static::getNamespacePrefixes.'\s*('.$title->getText.')(?:/.+)?~'));

334 - $pattern = '/'.static::getNamespacePrefixes.'([^ \t]+)(:\/.+)?/'; 334 + $pattern = '~'.static::getNamespacePrefixes.'([^ \t]+)(:/.+)?~';

I have not yet noticed this breaking anything else but will post again if I notice anything.