Use short array syntax
authorMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 14:32:27 +0000 (16:32 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 14:59:03 +0000 (16:59 +0200)
wcfsetup/install/files/lib/data/language/LanguageEditor.class.php

index e3d3968827c6f7f3bfb20d5a5e995b92f6ec6a4e..88b237f6e39edb327403a0467353507a66fd4e93 100644 (file)
@@ -91,7 +91,7 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                        
                        $writer->write("<?php\n/**\n* WoltLab Suite\n* language: ".$this->languageCode."\n* encoding: UTF-8\n* category: ".$category->languageCategory."\n* generated at ".gmdate("r")."\n* \n* DO NOT EDIT THIS FILE\n*/\n");
                        foreach ($languageItems as $languageItem => $languageItemValue) {
-                               $writer->write("\$this->items['".$languageItem."'] = '".str_replace(array("\\", "'"), array("\\\\", "\'"), $languageItemValue)."';\n");
+                               $writer->write("\$this->items['".$languageItem."'] = '".str_replace(["\\", "'"], ["\\\\", "\'"], $languageItemValue)."';\n");
                                
                                // compile dynamic language variables
                                if ($category->languageCategory != 'wcf.global' && strpos($languageItemValue, '{') !== false) {
@@ -103,7 +103,7 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                                        } // ignore compiler errors
                                        
                                        $writer->write("\$this->dynamicItems['".$languageItem."'] = '");
-                                       $writer->write(str_replace(array("\\", "'"), array("\\\\", "\'"), $output['template']));
+                                       $writer->write(str_replace(["\\", "'"], ["\\\\", "\'"], $output['template']));
                                        $writer->write("';\n");
                                }
                        }