[BUGFIX] Use non-static method getCache in Avatar class 36/57936/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 16 Aug 2018 20:28:03 +0000 (22:28 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 16 Aug 2018 20:53:24 +0000 (22:53 +0200)
The getCache method is not static but called as static twice.
Use $this->getCache() instead.

Resolves: #85879
Releases: master,8.7
Change-Id: Icfb28989c201894d0bfd2867642d7703426fabc2
Reviewed-on: https://review.typo3.org/57936
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Backend/Avatar/Avatar.php

index 0e678c1..ee95e7b 100644 (file)
@@ -59,7 +59,7 @@ class Avatar
             (string)$showIcon
         );
 
-        $avatar = static::getCache()->get($cacheId);
+        $avatar = $this->getCache()->get($cacheId);
 
         if (!$avatar) {
             $this->validateSortAndInitiateAvatarProviders();
@@ -71,7 +71,7 @@ class Avatar
                 'backendUser' => $backendUser
             ]);
             $avatar = $view->render();
-            static::getCache()->set($cacheId, $avatar);
+            $this->getCache()->set($cacheId, $avatar);
         }
 
         return $avatar;