diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-24 17:14:12 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-24 17:14:12 +0200 |
commit | b0a9acd8ff953736d6aeb39095aca278c0869563 (patch) | |
tree | 3b82c184a5c0fa3d548606ceaf3a98aa6586b0d7 /phpBB/phpbb/event | |
parent | d2ab30590988511778e9448ac68ad4db379e6f8a (diff) | |
download | forums-b0a9acd8ff953736d6aeb39095aca278c0869563.tar forums-b0a9acd8ff953736d6aeb39095aca278c0869563.tar.gz forums-b0a9acd8ff953736d6aeb39095aca278c0869563.tar.bz2 forums-b0a9acd8ff953736d6aeb39095aca278c0869563.tar.xz forums-b0a9acd8ff953736d6aeb39095aca278c0869563.zip |
[ticket/12273] Use array_merge instead of +=
PHPBB3-12273
Diffstat (limited to 'phpBB/phpbb/event')
-rw-r--r-- | phpBB/phpbb/event/php_exporter.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php index 3956be600b..8de3051d9b 100644 --- a/phpBB/phpbb/event/php_exporter.php +++ b/phpBB/phpbb/event/php_exporter.php @@ -302,17 +302,17 @@ class php_exporter { $line = ltrim($this->file_lines[$this->current_event_line - $vars_array_line], "\t"); $match = array(); - preg_match('#^\$vars (?:\+)?= array\(\'([a-zA-Z0-9_\' ,]+)\'\);$#', $line, $match); + preg_match('#^\$vars = (array_merge\(\$vars, )?array\(\'([a-zA-Z0-9_\' ,]+)\'\)(?(1)\));$#', $line, $match); - if (isset($match[1])) + if (isset($match[2])) { $found_vars_array = true; - if (strlen($match[1]) > 90) + if (strlen($match[2]) > 90) { throw new \LogicException('Should use multiple lines for $vars definition ' . "for event '{$this->current_event}' in file '{$this->current_file}:{$this->current_event_line}'", 3); } - $vars_array = array_merge($vars_array, explode("', '", $match[1])); + $vars_array = array_merge($vars_array, explode("', '", $match[2])); } $vars_array_line++; |