Page MenuHomePhabricator

PHP Warning: preg_match(): Compilation failed: two named subpatterns have the same name at offset 62
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.15

message
PHP Warning: preg_match(): Compilation failed: two named subpatterns have the same name at offset 62

Impact

Generates logspam when loading https://meta.wikimedia.org/wiki/Wikimedia_Taiwan/wiki/index.php5/$1 - this is obviously malformed, but also probably shouldn't result in an error.

Notes

1 instance of this since deploy of wmf.15 to group 1.

Details

Request ID
Xh8e9QpAAEAAAJzYY8IAAAEW
Request URL
https://meta.wikimedia.org/wiki/Wikimedia_Taiwan/wiki/index.php5/$1
Stack Trace
exception.trace
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.35.0-wmf.15/includes/PathRouter.php(311): preg_match(string, string, NULL)
#2 /srv/mediawiki/php-1.35.0-wmf.15/includes/PathRouter.php(285): PathRouter::extractTitle(string, stdClass)
#3 /srv/mediawiki/php-1.35.0-wmf.15/includes/PathRouter.php(260): PathRouter->internalParse(string)
#4 /srv/mediawiki/php-1.35.0-wmf.15/includes/WebRequest.php(209): PathRouter->parse(string)
#5 /srv/mediawiki/php-1.35.0-wmf.15/includes/WebRequest.php(365): WebRequest::getPathInfo(string)
#6 /srv/mediawiki/php-1.35.0-wmf.15/includes/Setup.php(765): WebRequest->interpolateTitle()
#7 /srv/mediawiki/php-1.35.0-wmf.15/includes/WebStart.php(81): require_once(string)
#8 /srv/mediawiki/php-1.35.0-wmf.15/index.php(43): require(string)
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}
Related Changes in Gerrit:

Event Timeline

Change 565762 had a related patch set uploaded (by D3r1ck01; owner: Derick N. Alangi):
[mediawiki/core@master] PathRouter: Allow duplicate names for subpatterns in RegEx

https://gerrit.wikimedia.org/r/565762

@brennen, I think this can be fixed by using the (?J) pattern modifier to support duplicate names for sub-patterns. I've dropped a patch, can you have a look?

Change 565762 abandoned by D3r1ck01:

[mediawiki/core@master] PathRouter: Allow duplicate names for subpatterns in RegEx

Reason:

https://gerrit.wikimedia.org/r/565762