Do not throw exception on valut generate key
This commit is contained in:
parent
0bd742ac07
commit
2f608b4dfa
@ -47,7 +47,9 @@ class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
|
|||||||
$this->lastMessage = null;
|
$this->lastMessage = null;
|
||||||
|
|
||||||
if (null === $this->encryptionKey && '' !== $this->decryptionKey = (string) $this->decryptionKey) {
|
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 {
|
try {
|
||||||
|
Reference in New Issue
Block a user