From: Mikael Nordfeldth Date: Fri, 4 Mar 2016 23:59:39 +0000 (+0100) Subject: File upload logging for dummies X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=952f68fed55aae6908fe1c85f1e96809d381af55;p=quix0rs-gnu-social.git File upload logging for dummies --- diff --git a/lib/filenotfoundexception.php b/lib/filenotfoundexception.php index d3610249db..70dd2d0b5d 100644 --- a/lib/filenotfoundexception.php +++ b/lib/filenotfoundexception.php @@ -36,6 +36,7 @@ class FileNotFoundException extends ServerException public function __construct($path) { $this->path = $path; + common_debug('File not found exception for: '._ve($this->path)); parent::__construct(_('File not found in filesystem.'), 404); } } diff --git a/lib/mediafile.php b/lib/mediafile.php index 1e0fb39769..7534dc53cb 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -306,10 +306,10 @@ class MediaFile $result = copy($stream['uri'], $filepath) && chmod($filepath, 0664); if (!$result) { + common_log(LOG_ERR, 'File could not be moved (or chmodded) from '._ve($stream['uri']) . ' to ' . _ve($filepath)); // TRANS: Client exception thrown when a file upload operation fails because the file could // TRANS: not be moved from the temporary folder to the permanent file location. - throw new ClientException(_('File could not be moved to destination directory.' . - $stream['uri'] . ' ' . $filepath)); + throw new ClientException(_('File could not be moved to destination directory.' )); } }