From: Cyperghost Date: Wed, 10 Jul 2024 08:12:20 +0000 (+0200) Subject: Fixes the error that the description for an assigned trophy is `null`. X-Git-Tag: 6.1.0_Alpha_1~4^2~6^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3109ae2bccfb44f58e11b6cde96bb820d7f4fc63;p=GitHub%2FWoltLab%2FWCF.git Fixes the error that the description for an assigned trophy is `null`. --- 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();