Skip to content

Commit

Permalink
compression of ".htdeployment" can be also gzip [Closes #147]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 27, 2021
1 parent 49e23b2 commit 608f441
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Deployment/Deployer.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ private function loadDeploymentFile(): ?array
} catch (ServerException $e) {
return null;
}
$content = gzinflate(file_get_contents($tempFile));
$s = file_get_contents($tempFile);
$content = @gzdecode($s) ?: gzinflate($s);
$res = [];
foreach (explode("\n", $content) as $item) {
if (count($item = explode('=', $item, 2)) === 2) {
Expand Down

0 comments on commit 608f441

Please sign in to comment.