summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-23 11:33:14 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-23 11:33:14 +0200
commit0b0e038b8bedd850d3c87796a1e6b46f554afa97 (patch)
tree816aed6fa33bf845522396c01c4b676a2ed9199c
parent6ffb139a4683f3cbdb263ebd3c65d3d201ef35aa (diff)
parent201cc59fe0e1ad0aadce599872275493b0c6d76b (diff)
downloadnextcloud-server-0b0e038b8bedd850d3c87796a1e6b46f554afa97.tar.gz
nextcloud-server-0b0e038b8bedd850d3c87796a1e6b46f554afa97.zip
Merge pull request #8671 from owncloud/log-upload-errors
php upload errors are written to log
-rw-r--r--apps/files/ajax/upload.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index a5ce7b257da..9750173d110 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -88,7 +88,9 @@ foreach ($_FILES['files']['error'] as $error) {
UPLOAD_ERR_NO_TMP_DIR => $l->t('Missing a temporary folder'),
UPLOAD_ERR_CANT_WRITE => $l->t('Failed to write to disk'),
);
- OCP\JSON::error(array('data' => array_merge(array('message' => $errors[$error]), $storageStats)));
+ $errorMessage = $errors[$error];
+ \OC::$server->getLogger()->alert("Upload error: $error - $errorMessage", array('app' => 'files'));
+ OCP\JSON::error(array('data' => array_merge(array('message' => $errorMessage), $storageStats)));
exit();
}
}