diff --git a/lib/WebGUI/Form/Image.pm b/lib/WebGUI/Form/Image.pm index 82571bd19..a36220ee1 100644 --- a/lib/WebGUI/Form/Image.pm +++ b/lib/WebGUI/Form/Image.pm @@ -140,7 +140,7 @@ sub getValue { my @files = @{$storage->getFiles}; my @images = grep{$storage->isImage($_)} @files; # Put all filenames that isImage returns true for into @images if ($self->get('forceImageOnly')) { - $storage->deleteFile($_) for grep{ ! $_ ~~ @images } @files; # Search @files for filenames that are not in @images and delete them + $storage->deleteFile($_) for grep{ ! ($_ ~~ @images) } @files; # Search @files for filenames that are not in @images and delete them @files = @images; }