summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/MagicWord.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/MagicWord.php b/includes/MagicWord.php
index 427a1adc..232f43e8 100644
--- a/includes/MagicWord.php
+++ b/includes/MagicWord.php
@@ -709,7 +709,9 @@ class MagicWordArray {
$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 {