Skip to content

Commit

Permalink
Fix error required parameter can not be null
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Pospisil committed Apr 19, 2017
1 parent 18a978a commit 7ff8c10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7ff8c10

Please sign in to comment.