From: Chad Horohoe Date: Fri, 10 Jun 2016 20:28:24 +0000 (-0700) Subject: Support short array syntax in findHooks.php X-Git-Tag: 1.31.0-rc.0~6628 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres//%22%7B%24url%7D?a=commitdiff_plain;h=79806e91e7512ae0122be81e3c84721f5d4f09e1;p=lhc%2Fweb%2Fwiklou.git Support short array syntax in findHooks.php Bug: T135257 Change-Id: I19d4f073ff730821230ccb28d29df303fbaccbc2 --- 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