diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f9ea4b..ecf24f5 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.1.7] - Ongoing +## [2.1.7] - 2025-03-17 This update introduces a quality of life improvement @@ -13,6 +13,9 @@ This update introduces a quality of life improvement - Refactor variable names for consistency and clarity in ShutdownHandler and PackageWriter classes - Improve error handling in ShutdownHandler by logging warnings for cleanup failures +### Fixed + - Fixed issue in ArchiveExctractor where close() may be called on a already closed resource + ## [2.1.6] - 2024-10-29 diff --git a/src/ncc/Classes/ArchiveExtractor.php b/src/ncc/Classes/ArchiveExtractor.php index 442c091..88f7cc5 100755 --- a/src/ncc/Classes/ArchiveExtractor.php +++ b/src/ncc/Classes/ArchiveExtractor.php @@ -29,6 +29,7 @@ use ncc\Utilities\Console; use PharData; use RuntimeException; + use ValueError; use ZipArchive; class ArchiveExtractor @@ -126,6 +127,13 @@ } } - $zip_archive->close(); + try + { + $zip_archive->close(); + } + catch(ValueError $e) + { + Console::outWarning('An error occurred while closing the zip archive, ' . $e->getMessage()); + } } } \ No newline at end of file