Page MenuHomePhabricator

PathRouter: preg_match(): Compilation failed: two named subpatterns have the same name
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error message
ErrorException from line 311 of /srv/mediawiki/php-1.35.0-wmf.3/includes/PathRouter.php: PHP Warning: preg_match(): Compilation failed: two named subpatterns have the same name at offset 62
Impact

The URL is clearly malformed in a couple of ways, so I'm guessing this isn't seen by many users.

Notes

Noticed a few instances crop up while watching logs during wmf.4 train deploy. Reproducible at given URL.

Details

Request URL
https://meta.wikimedia.org/wiki/Wikimedia_Taiwan/wiki/index.php5/$1
Stack Trace
2019-10-29 19:38:57 [XbiVUQpAADoAAHqdwMkAAAAA] mw1263 metawiki 1.35.0-wmf.3 error ERROR: [XbiVUQpAADoAAHqdwMkAAAAA] /wiki/Wikimedia_Taiwan/wiki/index.php5/$1   ErrorException from line 311 of /srv/mediawiki/php-1.35.0-wmf.3/includes/PathRouter.php: PHP Warning: preg_match(): Compilation failed: two named subpatterns have the same name at offset 62 {"exception_id":"XbiVUQpAADoAAHqdwMkAAAAA","exception_url":"/wiki/Wikimedia_Taiwan/wiki/index.php5/$1","caught_by":"mwe_handler"} 
[Exception ErrorException] (/srv/mediawiki/php-1.35.0-wmf.3/includes/PathRouter.php:311) PHP Warning: preg_match(): Compilation failed: two named subpatterns have the same name at offset 62
  #0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
  #1 /srv/mediawiki/php-1.35.0-wmf.3/includes/PathRouter.php(311): preg_match(string, string, NULL)
  #2 /srv/mediawiki/php-1.35.0-wmf.3/includes/PathRouter.php(285): PathRouter::extractTitle(string, stdClass)
  #3 /srv/mediawiki/php-1.35.0-wmf.3/includes/PathRouter.php(260): PathRouter->internalParse(string)
  #4 /srv/mediawiki/php-1.35.0-wmf.3/includes/WebRequest.php(208): PathRouter->parse(string)
  #5 /srv/mediawiki/php-1.35.0-wmf.3/includes/WebRequest.php(364): WebRequest::getPathInfo(string)
  #6 /srv/mediawiki/php-1.35.0-wmf.3/includes/Setup.php(779): WebRequest->interpolateTitle()
  #7 /srv/mediawiki/php-1.35.0-wmf.3/includes/WebStart.php(81): require_once(string)
  #8 /srv/mediawiki/php-1.35.0-wmf.3/index.php(41): require(string)
  #9 /srv/mediawiki/w/index.php(3): require(string)
  #10 {main}