Make MagicWordArray compatible with PCRE 8.34+
authorKevin Israel <pleasestand@live.com>
Sun, 22 Dec 2013 06:24:07 +0000 (01:24 -0500)
committerTim Starling <tstarling@wikimedia.org>
Tue, 31 Dec 2013 05:28:23 +0000 (05:28 +0000)
commitb9f291e8cd5bb1450f7b1031aa17cf7775aa7e96
tree32253e92328f31a2d66d99ed87a5e3833b6c225a
parent331bb31f477d1d40f51991cdaccf07a35dc2502b
Make MagicWordArray compatible with PCRE 8.34+

In PCRE 8.34, a subpattern's name must not start with a digit; work around
this by replacing digits in the synonym's index with letters. Amazingly,
this part of the name seems to have the sole purpose of ensuring uniqueness;
none of the matching functions actually use it for anything.

Adding a single-letter prefix was considered, though it would risk breaking
extension code that may have used 29- or 30- character magic word IDs.
(PCRE limits subpattern names to 32 characters.) Likewise, moving the magic
word's ID to the front would not work if it were to start with a digit.

Bug: 58640
Change-Id: Ic69f9000addbf18c4747105187e6f13191828fbb
RELEASE-NOTES-1.23
includes/MagicWord.php