Do not throw exception on valut generate key

This commit is contained in:
Jérémy Derussé 2019-12-24 14:11:19 +01:00
parent 0bd742ac07
commit 2f608b4dfa
No known key found for this signature in database
GPG Key ID: 2083FA5758C473D2
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
$this->lastMessage = null;
if (null === $this->encryptionKey && '' !== $this->decryptionKey = (string) $this->decryptionKey) {
throw new \LogicException('Cannot generate keys when a decryption key has been provided while instantiating the vault.');
$this->lastMessage = 'Cannot generate keys when a decryption key has been provided while instantiating the vault.';
return false;
}
try {