Fixes the error that the description for an assigned trophy is `null`.
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 10 Jul 2024 08:12:20 +0000 (10:12 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 10 Jul 2024 08:12:20 +0000 (10:12 +0200)
wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php
wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php

index 6bc8e3c711f65698b9491f3046fee7f457618a85..abf15ef171f5fdafd656ebd7fd319198c8bcd83e 100644 (file)
@@ -115,7 +115,7 @@ abstract class AbstractAcpForm extends AbstractForm
                 I18nHandler::getInstance()->setOptions(
                     $fieldName,
                     $value->getPackageID(),
-                    $databaseObject->{$fieldName},
+                    $databaseObject->{$fieldName} ?? '',
                     "{$value->getLanguageItem()}\\d+"
                 );
             }
index 747f216cf07409d738b8c31d94bb57cf9b66bf9c..3c9c900bd109804edd9cc5925839a353d74a2efd 100644 (file)
@@ -84,6 +84,7 @@ class TrophyConditionHandler extends SingletonFactory
                         'trophyID' => $trophy->trophyID,
                         'userID' => $userID,
                         'time' => TIME_NOW,
+                        'description' => '',
                     ],
                 ]))->executeAction();