]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Photo.php
Prevent settings/userexport to be used by anonymous users
[friendica.git] / src / Module / Photo.php
index ca27406067f886ad26ef8139a651c890e9822358..5faaafe40c813c6f5e675d61469636c7ba93af46 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -28,6 +28,7 @@ use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Photo as MPhoto;
 use Friendica\Util\Proxy;
+use Friendica\Object\Image;
 
 /**
  * Photo Module
@@ -112,7 +113,7 @@ class Photo extends BaseModule
 
                // if customsize is set and image is not a gif, resize it
                if ($photo['type'] !== "image/gif" && $customsize > 0 && $customsize < 501) {
-                       $img = MPhoto::getImageForPhoto($photo);
+                       $img = new Image($imgdata, $photo['type']);
                        $img->scaleToSquare($customsize);
                        $imgdata = $img->asString();
                }