From acd5c407ccd78dfeb34ccb02a15953463728a5f9 Mon Sep 17 00:00:00 2001 From: Eli Fatsi Date: Tue, 26 Jun 2018 10:33:00 -0600 Subject: [PATCH] Add file_exists check in front of filesize lookup in Asset validation --- src/fields/Assets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fields/Assets.php b/src/fields/Assets.php index 436c5f81948..8b01f023b25 100644 --- a/src/fields/Assets.php +++ b/src/fields/Assets.php @@ -250,7 +250,7 @@ public function validateFileSize(ElementInterface $element) $filenames[] = $file['filename']; } } else { - if (filesize($file['location']) > $maxSize) { + if (file_exists($file['location']) && (filesize($file['location']) > $maxSize)) { $filenames[] = $file['filename']; } }