Skip to content

Commit 693395e

Browse files
committed
Merge branch 'ntr/5.7/fix-plugin-download' into '5.7'
NTR - Fix plugin download See merge request shopware/5/product/shopware!548
2 parents 4152b26 + e963d8a commit 693395e

File tree

1 file changed

+9
-2
lines changed
  • engine/Shopware/Plugins/Default/Backend/SwagUpdate/Components

1 file changed

+9
-2
lines changed

engine/Shopware/Plugins/Default/Backend/SwagUpdate/Components/Download.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,20 @@ public function downloadFile($sourceUri, $destinationUri, $totalSize, $hash)
175175
$this->verifyHash($partFile, $hash);
176176
// close local file connections before move for windows
177177
$partFilePath = $partFile->getPathname();
178-
fclose($destination);
178+
179+
if (is_resource($destination)) {
180+
fclose($destination);
181+
}
182+
179183
unset($partFile);
180184
$this->moveFile($partFilePath, $destinationUri);
181185
}
182186

183187
// close local file
184-
fclose($destination);
188+
if (is_resource($destination)) {
189+
fclose($destination);
190+
}
191+
185192
unset($partFile);
186193

187194
return $size;

0 commit comments

Comments
 (0)