From bd95c7b82afee463ffc1e2687f234df1d05e57f7 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 5 Apr 2019 14:15:40 +0200 Subject: Update Photo.php --- Zotlabs/Module/Photo.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php index c31e63262..f397b952f 100644 --- a/Zotlabs/Module/Photo.php +++ b/Zotlabs/Module/Photo.php @@ -82,10 +82,11 @@ class Photo extends \Zotlabs\Web\Controller { if($r) { $modified = strtotime($r[0]['edited'] . "Z"); $data = dbunescbin($r[0]['content']); - $mimetype = $r[0]['mimetype']; + if(intval($r[0]['os_storage'])) + $data = file_get_contents($data); + else + $data = dbunescbin($r[0]['content']); } - if(intval($r[0]['os_storage'])) - $data = file_get_contents($data); if(! $data) { $d = [ 'imgscale' => $resolution, 'channel_id' => $uid, 'default' => $default, 'data' => '', 'mimetype' => '' ]; -- cgit v1.2.3