Skip to content

Commit

Permalink
test: restore empty for test
Browse files Browse the repository at this point in the history
  • Loading branch information
datamweb committed Oct 1, 2024
1 parent ba3a0aa commit ed5eb3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/Encryption/Handlers/SodiumHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function encrypt($data, $params = null)
{
$this->parseParams($params);

if ($this->key === null) {
if (empty($this->key)) {

Check failure on line 45 in system/Encryption/Handlers/SodiumHandler.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis

Construct empty() is not allowed. Use more strict comparison.
throw EncryptionException::forNeedsStarterKey();
}

Expand Down Expand Up @@ -73,7 +73,7 @@ public function decrypt($data, $params = null)
{
$this->parseParams($params);

if ($this->key === null) {
if (empty($this->key)) {

Check failure on line 76 in system/Encryption/Handlers/SodiumHandler.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis

Construct empty() is not allowed. Use more strict comparison.
throw EncryptionException::forNeedsStarterKey();
}

Expand Down

0 comments on commit ed5eb3a

Please sign in to comment.