summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/mediamanager.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php
index 7ad2f326c..471bd28ea 100644
--- a/lib/exe/mediamanager.php
+++ b/lib/exe/mediamanager.php
@@ -54,14 +54,17 @@
}
// give info on PHP catched upload errors
- if($_FILES['upload']['error']) switch($_FILES['upload']['error']){
- case 1:
- case 2:
- msg(sprintf($lang['uploadsize'],
- filesize_h(php_to_byte(ini_get('upload_max_filesize')))),-1);
- break;
- default:
- msg($lang['uploadfail'],-1);
+ if($_FILES['upload']['error']){
+ switch($_FILES['upload']['error']){
+ case 1:
+ case 2:
+ msg(sprintf($lang['uploadsize'],
+ filesize_h(php_to_byte(ini_get('upload_max_filesize')))),-1);
+ break;
+ default:
+ msg($lang['uploadfail'].' ('.$_FILES['upload']['error'].')',-1);
+ }
+ unset($_FILES['upload']);
}
// handle upload