From 80d0bf4566c098364790473d6b1c63aa3167922b Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Sat, 22 Jul 2017 08:43:10 +0200 Subject: [PATCH] [ticket/15291] Allow short array notation in event declarations PHPBB3-15291 --- phpBB/phpbb/event/php_exporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php index ae3553c558..26d7e2b426 100644 --- a/phpBB/phpbb/event/php_exporter.php +++ b/phpBB/phpbb/event/php_exporter.php @@ -392,7 +392,7 @@ class php_exporter public function get_vars_from_single_line_array($line, $throw_multiline = true) { $match = array(); - preg_match('#^\$vars = array\(\'([a-zA-Z0-9_\' ,]+)\'\);$#', $line, $match); + preg_match('#^\$vars = (?:\[|array\()\'([a-zA-Z0-9_\' ,]+)\'[\)\]];$#', $line, $match); if (isset($match[1])) {