From 608f441a4562d56ce845b98b1ba7c032fed59180 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Fri, 27 Aug 2021 12:19:12 +0200 Subject: [PATCH] compression of ".htdeployment" can be also gzip [Closes #147] --- src/Deployment/Deployer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Deployment/Deployer.php b/src/Deployment/Deployer.php index 6845164..ba77f04 100644 --- a/src/Deployment/Deployer.php +++ b/src/Deployment/Deployer.php @@ -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) {