From 9fde20fccf8398895066c32a5ee6fc36752dbbfb Mon Sep 17 00:00:00 2001 From: xl Date: Thu, 9 Nov 2023 22:15:34 +0800 Subject: [PATCH] eee --- src/Validator/Inject/NotIn.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Validator/Inject/NotIn.php b/src/Validator/Inject/NotIn.php index b35ee4f..f878e04 100644 --- a/src/Validator/Inject/NotIn.php +++ b/src/Validator/Inject/NotIn.php @@ -26,6 +26,9 @@ class NotIn implements ValidatorInterface */ public function dispatch(mixed $data, object $class): bool { + if ($data === null) { + return false; + } return !in_array($data, $this->value); } }