Skip to content

Commit 05e9e37

Browse files
committed
Fix check valid_if_empty
1 parent e921ebb commit 05e9e37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Validator/DocumentNumberAbstract.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ abstract class DocumentNumberAbstract extends AbstractValidator {
5454

5555
public function __construct($options = null) {
5656
parent::__construct($options);
57-
if (array_key_exists('valid_if_empty', $options))
57+
if (is_array($options) && array_key_exists('valid_if_empty', $options)) {
5858
$this->validIfEmpty = $options['valid_if_empty'];
59+
}
5960
}
6061

6162
/**

0 commit comments

Comments
 (0)