From 7ff8c103bef948b20a291d3585576ea1f4638f5e Mon Sep 17 00:00:00 2001 From: Jan Pospisil Date: Wed, 19 Apr 2017 16:17:08 +0200 Subject: [PATCH] Fix error required parameter can not be null --- src/Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Validator.php b/src/Validator.php index 3588921..2076ea5 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -15,7 +15,7 @@ class Validator extends \Nette\Object { public function validate($name, $isRequired, array $validators, $value){ - if(!$value === null && $isRequired) + if($value === null && $isRequired) throw new MissingRequiredParameterException('Parameter "'.$name.'" is required.'); if(!$value && !$isRequired) return $value;