Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f608b4

Browse filesBrowse files
committed
Do not throw exception on valut generate key
1 parent 0bd742a commit 2f608b4
Copy full SHA for 2f608b4

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public function generateKeys(bool $override = false): bool
4747
$this->lastMessage = null;
4848

4949
if (null === $this->encryptionKey && '' !== $this->decryptionKey = (string) $this->decryptionKey) {
50-
throw new \LogicException('Cannot generate keys when a decryption key has been provided while instantiating the vault.');
50+
$this->lastMessage = 'Cannot generate keys when a decryption key has been provided while instantiating the vault.';
51+
52+
return false;
5153
}
5254

5355
try {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.