From ac40a411dabc83d2250887f6e5a571eae45939fe Mon Sep 17 00:00:00 2001 From: eai04191 Date: Tue, 27 Aug 2019 20:49:04 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AF=E3=82=A8=E3=83=AA=E3=81=AE=E5=89=8D?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetadataResolver/DeviantArtResolver.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/MetadataResolver/DeviantArtResolver.php b/app/MetadataResolver/DeviantArtResolver.php index 9f775a7..939c6dd 100644 --- a/app/MetadataResolver/DeviantArtResolver.php +++ b/app/MetadataResolver/DeviantArtResolver.php @@ -34,7 +34,8 @@ class DeviantArtResolver implements Resolver if (strpos($data['url'], '/v1/fill/')) { $metadata->image = preg_replace('~/v1/fill/w_\d+,h_\d+,q_\d+,strp~', '/v1/fit/w_700,h_700,q_70,strp', $data['url']); } else { - $metadata->image = $data['url'] . '/v1/fit/w_700,h_700,q_70,strp/image.jpg'; + $queryStartPos = strpos($data['url'], '?'); + $metadata->image = substr_replace($data['url'], '/v1/fit/w_700,h_700,strp/image.jpg', $queryStartPos, 0); } } else { $metadata->image = $data['url'];