Use short array syntax
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 22 Oct 2020 07:49:55 +0000 (09:49 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 22 Oct 2020 07:49:55 +0000 (09:49 +0200)
files/lib/system/exporter/PhpBB31xExporter.class.php
files/lib/system/exporter/PhpBB3xExporter.class.php

index f8de4baa7997825ef032879d7f3e3aeeab9f9a6b..59a52e6f44492dd3cc0d5eb3b7754e611e650408 100644 (file)
@@ -1523,7 +1523,7 @@ class PhpBB31xExporter extends AbstractExporter {
                
                // fix quotes
                $text = preg_replace_callback('~\[quote=("?)([^"]+?)\\1(?:\s+post_id=(\d+)[^\]]*)?\]~', function ($matches) {
-                       $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[2]);
+                       $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[2]);
                        $postID = isset($matches[3]) ? $matches[3] : null;
                        
                        if ($postID) {
index e5cb41004b6f8e441800183074457fe7db311438..1789a5f9c710eb83af1fb568c74b9bdf6ecb8343 100644 (file)
@@ -1448,7 +1448,7 @@ class PhpBB3xExporter extends AbstractExporter {
                
                // fix quotes
                $text = preg_replace_callback('~\[quote="([^"]+?)"\]~', function ($matches) {
-                       $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[1]);
+                       $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[1]);
                        return "[quote='".$username."']";
                }, $text);