[ImageEncoder] Don't print_r the exception as that leads to an OOM error

This commit is contained in:
Hugo Sales 2021-08-03 17:46:39 +00:00
parent 4aee27d3a6
commit 77742c56c3
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -158,7 +158,7 @@ class ImageEncoder extends Plugin
try { try {
$image = Vips\Image::thumbnail($source, $width, ['height' => $height]); $image = Vips\Image::thumbnail($source, $width, ['height' => $height]);
} catch (Exception $e) { } catch (Exception $e) {
Log::error(__METHOD__ . ' encountered exception: ' . print_r($e, true)); Log::error(__METHOD__ . ' encountered exception: ' . get_class($e));
// TRANS: Exception thrown when trying to resize an unknown file type. // TRANS: Exception thrown when trying to resize an unknown file type.
throw new Exception(_m('Unknown file type')); throw new Exception(_m('Unknown file type'));
} }