<?php
namespace wcf\data\moderation\queue;
+use wcf\data\user\User;
use wcf\data\user\UserProfile;
use wcf\data\DatabaseObjectDecorator;
use wcf\data\IUserContent;
*/
public function getUserProfile() {
if ($this->affectedObject !== null && $this->userProfile === null) {
- $this->userProfile = UserProfile::getUserProfile($this->affectedObject->getUserID());
+ if ($this->affectedObject->getUserID()) {
+ $this->userProfile = UserProfile::getUserProfile($this->affectedObject->getUserID());
+ }
+ else {
+ $this->userProfile = new UserProfile(new User(null, array()));
+ }
}
return $this->userProfile;