diff --git a/src/DocumentMinifier.php b/src/DocumentMinifier.php index bd33ea1..32e8400 100644 --- a/src/DocumentMinifier.php +++ b/src/DocumentMinifier.php @@ -248,7 +248,7 @@ private function extractZipTo(string $zippedDocumentPath, string $extractionDir, } } $zip = new \ZipArchive(); - $openResult = $zip->open($zippedDocumentPath); + $openResult = $zip->open($zippedDocumentPath, \ZipArchive::CREATE); if ($openResult !== true) { throw new $exceptionClass( "Exception when extracting document: Failed to open $zippedDocumentPath as a ZIP file."