X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmediafile.php;h=29d752f0c6c9a8489e7b209ea356af9677e07a07;hb=69ac99ff949ab0118ff25a62471980ad0ec7a52b;hp=40f37ba61ac0a746d6f331e22a9973a47cab6b38;hpb=e5a2f895a074a6eaaf8184f101503b1520ed780b;p=quix0rs-gnu-social.git diff --git a/lib/mediafile.php b/lib/mediafile.php index 40f37ba61a..29d752f0c6 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -1,8 +1,10 @@ * @author Zach Copley * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 @@ -149,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; @@ -159,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; }