Get better error message for duplicate names in MagicWordArray
authorUmherirrender <umherirrender_de.wp@web.de>
Thu, 3 Aug 2017 20:52:22 +0000 (22:52 +0200)
committerKrinkle <krinklemail@gmail.com>
Fri, 11 Aug 2017 14:26:20 +0000 (14:26 +0000)
commita6f4ec848e4b7303179f32173e949a3d9b795c90
tree3fc26a619d6c0904780c25eace4552a348f3d061
parent87a0b17127195742e6c64472dbfdac65b4d254d7
Get better error message for duplicate names in MagicWordArray

Actually php says:
Warning: Compilation failed: two named subpatterns have the same name at
offset 679

The message is not helpful to find the duplicate name inside the
MagicWordArray, because the generated regex is unknown to count the
correct offset.
Try to detect such duplicates and throw an exception with more
information and a stacktrace.

Change-Id: I95dea67da06aa4000d52ac3338c3b865450b3e23
includes/MagicWordArray.php