use UserProfile::getGuestUserProfile instead of creating an own object
authorJoshua Rüsweg <josh@bastelstu.be>
Fri, 9 Jun 2017 09:42:58 +0000 (11:42 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Fri, 9 Jun 2017 09:44:20 +0000 (11:44 +0200)
wcfsetup/install/files/lib/system/sitemap/object/AbstractSitemapObjectObjectType.class.php

index 1a067dde9c87acb23a6687c318d975f642d37c7c..f0cf58e47d594f11ffad6c9ba6fd1da385e24be4 100755 (executable)
@@ -1,6 +1,5 @@
 <?php
 namespace wcf\system\sitemap\object;
-use wcf\data\user\User;
 use wcf\data\user\UserProfile;
 use wcf\data\DatabaseObject;
 
@@ -56,8 +55,7 @@ abstract class AbstractSitemapObjectObjectType implements ISitemapObjectObjectTy
         */
        public static function getGuestUserProfile() {
                if (self::$userProfile === null) {
-                       $user = new User(null, []);
-                       self::$userProfile = new UserProfile($user);
+                       self::$userProfile = UserProfile::getGuestUserProfile('');
                }
 
                return self::$userProfile;