Skip to content

Commit c5a47a8

Browse files
committed
fix(psalm): Fix some unrelated psalm issues
Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 63dfc44 commit c5a47a8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Authentication/WebAuthn/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function finishRegister(PublicKeyCredentialCreationOptions $publicKeyCred
141141
}
142142

143143
private function stripPort(string $serverHost): string {
144-
return preg_replace('/(:\d+$)/', '', $serverHost);
144+
return preg_replace('/(:\d+$)/', '', $serverHost) ?? '';
145145
}
146146

147147
public function startAuthentication(string $uid, string $serverHost): PublicKeyCredentialRequestOptions {

lib/private/Avatar/Avatar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ protected function generateAvatar(string $userDisplayName, int $size, bool $dark
191191
$data = ob_get_contents();
192192
ob_end_clean();
193193

194-
return $data;
194+
return $data ?: '';
195195
}
196196

197197
/**

0 commit comments

Comments
 (0)