Skip to content

Commit f56c77e

Browse files
kilidakoenpunt
authored andcommitted
Duplicate conditional expression in Validations.php (#545)
`!is_string($options['with'])` is repeated.
1 parent 891ff0d commit f56c77e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Validations.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public function validates_format_of($attrs)
422422
$attribute = $options[0];
423423
$var = $this->model->$attribute;
424424

425-
if (is_null($options['with']) || !is_string($options['with']) || !is_string($options['with']))
425+
if (is_null($options['with']) || !is_string($options['with']))
426426
throw new ValidationsArgumentError('A regular expression must be supplied as the [with] option of the configuration array.');
427427
else
428428
$expression = $options['with'];

0 commit comments

Comments
 (0)