diff options
Diffstat (limited to 'mod/profile_photo.php')
-rw-r--r-- | mod/profile_photo.php | 5 |
1 files changed, 4 insertions, 1 deletions
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()) { |