From 79806e91e7512ae0122be81e3c84721f5d4f09e1 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 10 Jun 2016 13:28:24 -0700 Subject: [PATCH] Support short array syntax in findHooks.php Bug: T135257 Change-Id: I19d4f073ff730821230ccb28d29df303fbaccbc2 --- maintenance/findHooks.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index 7304a2a753..c91d8247e5 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -244,11 +244,11 @@ class FindHooks extends Maintenance { // Comma for second argument '(?:\s*(,))?' . // Second argument must start with array to be processed - '(?:\s*array\s*\(' . + '(?:\s*(?:array\s*\(|\[)' . // Matching inside array - allows one deep of brackets - '((?:[^\(\)]|\([^\(\)]*\))*)' . + '((?:[^\(\)\[\]]|\((?-1)\)|\[(?-1)\])*)' . // End - '\))?/', + '[\)\]])?/', $content, $m, PREG_SET_ORDER -- 2.20.1