diff --git a/src/Encryption/EntityEncryption.php b/src/Encryption/EntityEncryption.php index db76ddb..a1b5cf7 100644 --- a/src/Encryption/EntityEncryption.php +++ b/src/Encryption/EntityEncryption.php @@ -163,9 +163,13 @@ protected function process(object $entity) : array return $marked; } - protected function hasMarker(string $value) : bool + protected function hasMarker(?string $value) : bool { - $substr = strpos($value, self::ENCRYPTION_MARKER); + $substr = false; + + if ($value !== null) { + $substr = strpos($value, self::ENCRYPTION_MARKER); + } return $substr !== false; }