summaryrefslogtreecommitdiff
path: root/lib/mediafile.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-02 17:21:23 +0000
committerSarven Capadisli <csarven@status.net>2009-11-02 17:21:23 +0000
commiteaae5a4c90249330034e8ee1004e85ae6399fe70 (patch)
tree36c5e1420b4340773f7b6cca4ceca0c075869938 /lib/mediafile.php
parent4aa6deb8abb725be7fa6dc30bdfd2e7de1ff24d1 (diff)
parent5581143bee602dbd5417f532f2b483e58d0a4269 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
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;
}