From 918aaa64e21db84df17607c42d93e5c7bddd3e08 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 9 Sep 2015 03:40:53 -0700 Subject: profile photo issues #36 --- mod/profile_photo.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 9f57c3b9d..7564a3f69 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -238,16 +238,19 @@ function profile_photo_post(&$a) { notice( t('Image upload failed.') . EOL ); return; } + $os_storage = false; + foreach($i as $ii) { if(intval($ii['scale']) < 2) { $smallest = intval($ii['scale']); + $os_storage = intval($ii['os_storage']); $imagedata = $ii['data']; $filetype = $ii['type']; } } } -// $imagedata = @file_get_contents($src); + $imagedata = (($os_storage) ? @file_get_contents($imagedata) : $imagedata); $ph = photo_factory($imagedata, $filetype); if(! $ph->is_valid()) { -- cgit v1.2.3