summaryrefslogtreecommitdiff
path: root/lib/mediafile.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-02 18:13:04 -0500
committerEvan Prodromou <evan@status.net>2009-11-02 18:13:04 -0500
commita2b830392597d88c435baf54ad0df4ecda02dc41 (patch)
tree08f8ddcbcab63de9117ccf82e5477fa0d565bdc6 /lib/mediafile.php
parent61419038e5747886357964a7eb3f814761482891 (diff)
parent15d0055c6f2e3b7007a82df40502e15cf5c32a13 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts: classes/User.php
Diffstat (limited to 'lib/mediafile.php')
-rw-r--r--lib/mediafile.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mediafile.php b/lib/mediafile.php
index d4d184dd0..29d752f0c 100644
--- a/lib/mediafile.php
+++ b/lib/mediafile.php
@@ -152,6 +152,9 @@ class MediaFile
throw new ClientException(_('The uploaded file was only' .
' partially uploaded.'));
return;
+ case UPLOAD_ERR_NO_FILE:
+ // No file; probably just a non-AJAX submission.
+ return;
case UPLOAD_ERR_NO_TMP_DIR:
throw new ClientException(_('Missing a temporary folder.'));
return;
@@ -162,6 +165,8 @@ class MediaFile
throw new ClientException(_('File upload stopped by extension.'));
return;
default:
+ common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
+ $_FILES[$param]['error']);
throw new ClientException(_('System error uploading file.'));
return;
}