We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59e2658 commit c5b1134Copy full SHA for c5b1134
UriSigner.php
@@ -12,8 +12,6 @@
12
namespace Symfony\Component\HttpFoundation;
13
14
/**
15
- * Signs URIs.
16
- *
17
* @author Fabien Potencier <[email protected]>
18
*/
19
class UriSigner
@@ -22,11 +20,14 @@ class UriSigner
22
20
private string $parameter;
23
21
24
25
- * @param string $secret A secret
26
* @param string $parameter Query string parameter to use
27
28
public function __construct(#[\SensitiveParameter] string $secret, string $parameter = '_hash')
29
{
+ if (!$secret) {
+ throw new \InvalidArgumentException('A non-empty secret is required.');
+ }
30
+
31
$this->secret = $secret;
32
$this->parameter = $parameter;
33
}
0 commit comments