From c91a9ca3c69893ff1ad20e52217482cb3e68f542 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 30 Jul 2016 16:32:27 +0200 Subject: [PATCH] Use short array syntax --- .../install/files/lib/data/language/LanguageEditor.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index e3d3968827..88b237f6e3 100644 --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@ -91,7 +91,7 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje $writer->write("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"); } } -- 2.20.1