mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-04-12 03:28:30 +02:00
Change returned type to handle exceptions correctly
This commit is contained in:
parent
2cb4578109
commit
aa7321ce81
@ -406,9 +406,9 @@ private function tokenOtpType() : string
|
||||
/**
|
||||
* Gets the image resource pointed by the token image parameter and store it as an icon
|
||||
*
|
||||
* @return string The filename of the stored icon
|
||||
* @return string|null The filename of the stored icon or null if the operation fails
|
||||
*/
|
||||
private function storeTokenImageAsIcon() : string
|
||||
private function storeTokenImageAsIcon()
|
||||
{
|
||||
try {
|
||||
$remoteImageURL = $this->token->getParameter('image');
|
||||
@ -433,7 +433,7 @@ private function storeTokenImageAsIcon() : string
|
||||
return $newFilename;
|
||||
}
|
||||
catch (\Assert\AssertionFailedException|\Assert\InvalidArgumentException|\Exception|\Throwable $ex) {
|
||||
// TODO : log the error
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user