]> git.mxchange.org Git - friendica.git/commitdiff
Unneeded workaround removed
authorMichael <heluecht@pirati.ca>
Mon, 5 Jul 2021 05:11:35 +0000 (05:11 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 5 Jul 2021 05:11:35 +0000 (05:11 +0000)
src/Util/Images.php

index a65f9a1a8b16fa24ed022a74ea1711d4aee0730a..7b11ea3f6b580e57286d33beab41c04c409c6153 100644 (file)
@@ -193,18 +193,7 @@ class Images
                $filesize = strlen($img_str);
 
                try {
-                       if (function_exists("getimagesizefromstring")) {
-                               $data = @getimagesizefromstring($img_str);
-                       } else {
-                               $tempfile = tempnam(get_temppath(), "cache");
-
-                               $stamp1 = microtime(true);
-                               file_put_contents($tempfile, $img_str);
-                               DI::profiler()->saveTimestamp($stamp1, "file");
-
-                               $data = getimagesize($tempfile);
-                               unlink($tempfile);
-                       }
+                       $data = @getimagesizefromstring($img_str);
                } catch (\Exception $e) {
                        return [];
                }