To be safe don't unload until end (#23752)

* To be safe don't unload until end

* unlink needs to be before return to actually do anything
This commit is contained in:
Joshua Ruehlig 2016-04-11 05:04:57 -07:00 committed by Thomas Müller
parent 929a28421a
commit 329849f2c2

View file

@ -53,10 +53,10 @@ abstract class Image extends Provider {
$fileName = $fileview->getLocalFile($path);
}
$image->loadFromFile($fileName);
$image->fixOrientation();
if ($useTempFile) {
unlink($fileName);
}
$image->fixOrientation();
if ($image->valid()) {
$image->scaleDownToFit($maxX, $maxY);