Skip to content
This repository was archived by the owner on May 27, 2023. It is now read-only.

Commit 0aaaa35

Browse files
committed
fixed wrong typehint
1 parent d05cd6f commit 0aaaa35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Bridge/ProfileModuleBridge.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function getAvatar($uid = null, array $parameters = []): string
162162
*
163163
* @param int|string $uid The user's id or name
164164
*/
165-
private function findUser($uid = null): UserEntity
165+
private function findUser($uid = null): ?UserEntity
166166
{
167167
if (empty($uid) && $this->currentUser->isLoggedIn()) {
168168
$uid = $this->currentUser->get('uid');
@@ -174,10 +174,10 @@ private function findUser($uid = null): UserEntity
174174
// select user id by user name
175175
$results = $this->userRepository->searchActiveUser(['operator' => '=', 'operand' => $uid], 1);
176176
if (!count($results)) {
177-
return '';
177+
return null;
178178
}
179179

180-
return $results->getIterator()->getArrayCopy()[0];
180+
return $results[0];
181181
}
182182

183183
/**

0 commit comments

Comments
 (0)