Permalink
Browse files

Group name must start with a non-digit in PCRE 8.34+

  • Loading branch information...
1 parent d8d169d commit bb1ad1b8ff160d374fca6d66464ae7967c32d236 @9072997 9072997 committed May 1, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 host-tools/offline-renderer/mediawiki-offline/includes/MagicWord.php
@@ -542,7 +542,9 @@ function getBaseRegex() {
$magic = MagicWord::get( $name );
$case = intval( $magic->isCaseSensitive() );
foreach ( $magic->getSynonyms() as $i => $syn ) {
- $group = "(?P<{$i}_{$name}>" . preg_quote( $syn, '/' ) . ')';
+ // Group name must start with a non-digit in PCRE 8.34+
+ $it = strtr( $i, '0123456789', 'abcdefghij' );
+ $group = "(?P<{$it}_{$name}>" . preg_quote( $syn, '/' ) . ')';
if ( $this->baseRegex[$case] === '' ) {
$this->baseRegex[$case] = $group;
} else {

0 comments on commit bb1ad1b

Please sign in to comment.