From: Joshua Rüsweg Date: Fri, 10 Jan 2020 19:24:30 +0000 (+0100) Subject: Fix adding reactions with multilingual title fields X-Git-Tag: 5.2.2~60 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05647e386fb9dd5c1a307ba131ddc7c8030623c4;p=GitHub%2FWoltLab%2FWCF.git Fix adding reactions with multilingual title fields --- 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);