From 3109ae2bccfb44f58e11b6cde96bb820d7f4fc63 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 10 Jul 2024 10:12:20 +0200 Subject: [PATCH] Fixes the error that the description for an assigned trophy is `null`. --- wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php | 2 +- .../system/trophy/condition/TrophyConditionHandler.class.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php index 6bc8e3c711..abf15ef171 100644 --- a/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php @@ -115,7 +115,7 @@ abstract class AbstractAcpForm extends AbstractForm I18nHandler::getInstance()->setOptions( $fieldName, $value->getPackageID(), - $databaseObject->{$fieldName}, + $databaseObject->{$fieldName} ?? '', "{$value->getLanguageItem()}\\d+" ); } diff --git a/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php b/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php index 747f216cf0..3c9c900bd1 100644 --- a/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php +++ b/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php @@ -84,6 +84,7 @@ class TrophyConditionHandler extends SingletonFactory 'trophyID' => $trophy->trophyID, 'userID' => $userID, 'time' => TIME_NOW, + 'description' => '', ], ]))->executeAction(); -- 2.20.1