[Pkg-owncloud-commits] [owncloud] 22/85: php upload errors are written to log

David Prévot taffit at moszumanska.debian.org
Tue Jun 17 19:12:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch 6.0
in repository owncloud.

commit 1eedab7f6ed696dc693bf9e363d9663460228eef
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Fri May 23 11:45:35 2014 +0200

    php upload errors are written to log
---
 apps/files/ajax/upload.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index e72071e..07e39a8 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -79,7 +79,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];
+		\OCP\Util::writeLog('files', "Upload error: $error - $errorMessage", \OCP\Util::ERROR);
+		OCP\JSON::error(array('data' => array_merge(array('message' => $errorMessage), $storageStats)));
 		exit();
 	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list