Add a failsafe for the creation of test trophies
authorAlexander Ebert <ebert@woltlab.com>
Mon, 2 Oct 2023 13:12:03 +0000 (15:12 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 2 Oct 2023 13:12:03 +0000 (15:12 +0200)
wcfsetup/install/files/lib/system/user/notification/event/UserTrophyReceivedNotificationEvent.class.php

index 19da5691a81e42159b4d519b8f13db3293d09ee0..f3b610558dfb3905acfa6c9cbe40f1b41bb662f3 100644 (file)
@@ -12,6 +12,7 @@ use wcf\data\user\trophy\UserTrophyAction;
 use wcf\data\user\UserProfile;
 use wcf\system\cache\builder\CategoryCacheBuilder;
 use wcf\system\cache\builder\TrophyCacheBuilder;
+use wcf\system\style\FontAwesomeIcon;
 use wcf\system\user\notification\object\UserTrophyNotificationObject;
 use wcf\system\user\notification\TestableUserNotificationEventHandler;
 
@@ -89,7 +90,7 @@ class UserTrophyReceivedNotificationEvent extends AbstractUserNotificationEvent
                 'type' => Trophy::TYPE_BADGE,
                 'isDisabled' => 0,
                 'awardAutomatically' => 0,
-                'iconName' => 'trophy;false',
+                'iconName' => FontAwesomeIcon::fromString('trophy;false')->__toString(),
                 'iconColor' => 'rgba(255, 255, 255, 1)',
                 'badgeColor' => 'rgba(50, 92, 132, 1)',
             ],