Skip to content

Commit f40dbd7

Browse files
committed
added exceptions and default to upload error translator function
1 parent 431a099 commit f40dbd7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

web/lib/helpers.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ function uploadErrorTranslator($code){
8484
4 => 'No file was uploaded',
8585
6 => 'Missing a temporary folder',
8686
7 => 'Failed to write file to disk.',
87-
8 => 'A PHP extension stopped the file upload.'
87+
8 => 'A PHP extension stopped the file upload.',
88+
null => 'No file uploaded',
89+
default => 'Unknown error'
8890
};
8991
}

0 commit comments

Comments
 (0)