Merge branch 'MDL-50887-master' of https://github.com/lucisgit/moodle
[moodle.git] / repository / upload / lib.php
index 761690e..2f14477 100644 (file)
@@ -191,7 +191,7 @@ class repository_upload extends repository {
         }
 
         if (($maxbytes!==-1) && (filesize($_FILES[$elname]['tmp_name']) > $maxbytes)) {
-            throw new file_exception('maxbytes');
+            throw new file_exception('maxbytesforfile', $_FILES[$elname]['name']);
         }
 
         if (file_is_draft_area_limit_reached($record->itemid, $areamaxbytes, filesize($_FILES[$elname]['tmp_name']))) {