diff --git a/src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php b/src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php index 883a68613c..047d8d5804 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php +++ b/src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php @@ -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 {