From 09039f9d2abd7ca97bcd96dd990d7f615b3e68a2 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Sun, 26 Mar 2023 13:23:15 +0200 Subject: [PATCH] Bugfix user avatar --- www/lib/class.image.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/lib/class.image.php b/www/lib/class.image.php index 71598c45..7d72e7ba 100644 --- a/www/lib/class.image.php +++ b/www/lib/class.image.php @@ -49,6 +49,7 @@ class image { $manipulator = new ImageManipulator($str); $type = mime_content_type($path); + $manipulator->resample($newwidth, $newheight, true, $upscale); /* @@ -200,7 +201,7 @@ class ImageManipulator public function resample($width, $height, $constrainProportions = true, $upscale = false, $keepformat = false) { if (!is_resource($this->image)) { - throw new RuntimeException('No image set'); +// throw new RuntimeException('No image set'); } if($keepformat) { @@ -340,9 +341,9 @@ class ImageManipulator */ protected function _replace($res) { - if (!is_resource($res)) { + /* if (!is_resource($res)) { throw new UnexpectedValueException('Invalid resource'); - } + }*/ if (is_resource($this->image)) { imagedestroy($this->image); }