diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2014-03-05 15:23:35 +0100 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2014-03-05 15:23:35 +0100 |
commit | 37d22bf170708a3f6b9395fb6afe25c255e91a9a (patch) | |
tree | 294d145ab20038ad17da914d1e245ac92bbd2266 | |
parent | 859cac197e0284be11f29edda20c10fb5307f4d8 (diff) | |
parent | bdb96b9af85256f9b3f8663ccf6d27b3d1330918 (diff) | |
download | nextcloud-server-37d22bf170708a3f6b9395fb6afe25c255e91a9a.tar.gz nextcloud-server-37d22bf170708a3f6b9395fb6afe25c255e91a9a.zip |
Merge pull request #7558 from owncloud/fix_issue_loading_cached_thumb
fix issue with spamming logging files when loading cached thumbnail
-rwxr-xr-x | lib/private/preview.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index 798a1322b03..b0d91fd5680 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -403,7 +403,9 @@ class Preview { $cached = $this->isCached(); if ($cached) { - $image = new \OC_Image($this->userView->file_get_contents($cached, 'r')); + $stream = $this->userView->fopen($cached, 'r'); + $image = new \OC_Image(); + $image->loadFromFileHandle($stream); $this->preview = $image->valid() ? $image : null; $this->resizeAndCrop(); } |