Skip to content

Commit 42f1182

Browse files
committed
fix: run rector
1 parent ed5eb3a commit 42f1182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Encryption/Handlers/SodiumHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function encrypt($data, $params = null)
4242
{
4343
$this->parseParams($params);
4444

45-
if (empty($this->key)) {
45+
if ($this->key === null || $this->key === '' || $this->key === '0') {
4646
throw EncryptionException::forNeedsStarterKey();
4747
}
4848

@@ -73,7 +73,7 @@ public function decrypt($data, $params = null)
7373
{
7474
$this->parseParams($params);
7575

76-
if (empty($this->key)) {
76+
if ($this->key === null || $this->key === '' || $this->key === '0') {
7777
throw EncryptionException::forNeedsStarterKey();
7878
}
7979

0 commit comments

Comments
 (0)