Unneeded workaround removed
This commit is contained in:
parent
a06d699480
commit
fccb725651
1 changed files with 1 additions and 12 deletions
|
@ -193,18 +193,7 @@ class Images
|
||||||
$filesize = strlen($img_str);
|
$filesize = strlen($img_str);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (function_exists("getimagesizefromstring")) {
|
$data = @getimagesizefromstring($img_str);
|
||||||
$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);
|
|
||||||
}
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue