From 2962144223507bc37d48f9fcf7bf28dfe85d9214 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Mon, 26 Jun 2017 15:12:43 -0400 Subject: [PATCH] Prevent imageUpload model from stripping images if the source is a URL, on account of the import script --- models/admin/ajax/imageUpload.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/models/admin/ajax/imageUpload.php b/models/admin/ajax/imageUpload.php index 85c771b9..fd2ba6af 100644 --- a/models/admin/ajax/imageUpload.php +++ b/models/admin/ajax/imageUpload.php @@ -181,8 +181,11 @@ class GlmMembersAdmin_ajax_imageUpload extends GlmDataImages ); } - // Strip meta data off image - this prevents EXIF orientation shenanigans - $file['tmp_name'] = $this->stripImageMeta($file['tmp_name']); + // If the image resource is a url (from the import script) then don't try to strip it + if (!filter_var($file['tmp_name'], FILTER_VALIDATE_URL)) { + // Strip meta data off image - this prevents EXIF orientation shenanigans + $file['tmp_name'] = $this->stripImageMeta($file['tmp_name']); + } // Get the desired file name and add a timestamp to it to ensure that it's unique $fInfo = pathinfo($file['name']); -- 2.17.1