Skip to content

Commit 160e2c4

Browse files
bug #34285 [FrameworkBundle] fix SodiumVault after stof review (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle] fix SodiumVault after stof review | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - As spotted by @stof in symfony/symfony#34275 (review) Commits ------- a594599078 [FrameworkBundle] fix SodiumVault after stof review
2 parents 85c1ed7 + 1426dbe commit 160e2c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Secrets/SodiumVault.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function generateKeys(bool $override = false): bool
5252

5353
try {
5454
$this->loadKeys();
55-
} catch (\LogicException $e) {
55+
} catch (\RuntimeException $e) {
5656
// ignore failures to load keys
5757
}
5858

@@ -186,7 +186,7 @@ private function loadKeys(): void
186186
} elseif ('' !== $this->decryptionKey) {
187187
$this->encryptionKey = sodium_crypto_box_publickey($this->decryptionKey);
188188
} else {
189-
throw new \LogicException(sprintf('Encryption key not found in "%s".', \dirname($this->pathPrefix)));
189+
throw new \RuntimeException(sprintf('Encryption key not found in "%s".', \dirname($this->pathPrefix)));
190190
}
191191
}
192192

0 commit comments

Comments
 (0)