[Pkg-owncloud-commits] [owncloud] 123/153: php upload errors are written to log

David Prévot taffit at moszumanska.debian.org
Tue May 27 03:05:45 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit 201cc59fe0e1ad0aadce599872275493b0c6d76b
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Thu May 22 12:20:27 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 a5ce7b2..9750173 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();
 	}
 }

-- 
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