From 05647e386fb9dd5c1a307ba131ddc7c8030623c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Fri, 10 Jan 2020 20:24:30 +0100 Subject: [PATCH] Fix adding reactions with multilingual title fields --- .../lib/data/reaction/type/ReactionTypeAction.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php b/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php index 2317ee042a..ee73d23b61 100644 --- a/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php +++ b/wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php @@ -54,6 +54,12 @@ class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortab ]); } + // The title cannot be empty by design, but cannot be filled proper if the + // multilingualism is enabled, therefore, we must fill the tilte with a dummy value. + if (!isset($this->parameters['data']['title']) && isset($this->parameters['title_i18n'])) { + $this->parameters['data']['title'] = 'wcf.reactionType.title'; + } + /** @var ReactionType $reactionType */ $reactionType = parent::create(); $reactionTypeEditor = new ReactionTypeEditor($reactionType); -- 2.20.1