From c9379b360813f10cc9db341d4fead61e6bfd54ab Mon Sep 17 00:00:00 2001 From: Miguel Dantas Date: Mon, 15 Jul 2019 00:03:56 +0100 Subject: [PATCH] [Embed] Fix bug where we we're losing track of a file, in case the image needed to be reencoded --- plugins/Embed/EmbedPlugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Embed/EmbedPlugin.php b/plugins/Embed/EmbedPlugin.php index b7b4640cc5..c7cf4d228c 100644 --- a/plugins/Embed/EmbedPlugin.php +++ b/plugins/Embed/EmbedPlugin.php @@ -549,8 +549,10 @@ class EmbedPlugin extends Plugin } } else { throw new AlreadyFulfilledException('A thumbnail seems to already exist for remote file with id==' . - $thumbnail->file_id); + $thumbnail->file_id . ' at path ' . $fullpath); } + } catch (AlreadyFulfilledException $e) { + // Carry on } catch (Exception $err) { common_log(LOG_ERR, "Went to write a thumbnail to disk in EmbedPlugin::storeRemoteThumbnail " . "but encountered error: {$err}");