Skip to content

Commit 947b81b

Browse files
tfbritosrtab
authored andcommitted
Fixed function
1 parent 1c7043d commit 947b81b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Validators/FileTypeValidator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public function __construct(array $valid_filetypes, $message = null)
2424

2525
public function __invoke($value)
2626
{
27-
if (isset($value->size) &&
28-
$value->size > 0 && !is_null($this->valid_filetypes) && !in_array($value->type, $this->valid_filetypes)) {
27+
if ($value->size > 0 && !is_null($this->valid_filetypes) && !in_array($value->type, $this->valid_filetypes)) {
2928
$message = msg($this->message, array(
3029
"valid_types" => implode(", ", $this->valid_filetypes),
3130
"type" => $value->type

0 commit comments

Comments
 (0)