diff --git a/composer.lock b/composer.lock index f831873fff5ee..4a75bed00cd4a 100644 --- a/composer.lock +++ b/composer.lock @@ -187,16 +187,16 @@ }, { "name": "joomla/archive", - "version": "1.1.7", + "version": "1.1.8", "source": { "type": "git", "url": "https://github.com/joomla-framework/archive.git", - "reference": "185be301bae7cb6479a1e755944a68d52870e9fe" + "reference": "3753805379a764fa96fd3db7e3b6218760d169ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/archive/zipball/185be301bae7cb6479a1e755944a68d52870e9fe", - "reference": "185be301bae7cb6479a1e755944a68d52870e9fe", + "url": "https://api.github.com/repos/joomla-framework/archive/zipball/3753805379a764fa96fd3db7e3b6218760d169ac", + "reference": "3753805379a764fa96fd3db7e3b6218760d169ac", "shasum": "" }, "require": { @@ -235,7 +235,17 @@ "framework", "joomla" ], - "time": "2020-11-14T17:40:00+00:00" + "funding": [ + { + "url": "https://community.joomla.org/sponsorship-campaigns.html", + "type": "custom" + }, + { + "url": "https://github.com/joomla", + "type": "github" + } + ], + "time": "2020-11-27T23:24:42+00:00" }, { "name": "joomla/compat", diff --git a/libraries/joomla/archive/zip.php b/libraries/joomla/archive/zip.php index 613a48509cc36..6c82240bda58e 100644 --- a/libraries/joomla/archive/zip.php +++ b/libraries/joomla/archive/zip.php @@ -305,16 +305,13 @@ protected function extractNative($archive, $destination) continue; } - $stream = $zip->getStream($file); + $buffer = $zip->getFromIndex($index); - if ($stream === false) + if ($buffer === false) { return $this->raiseWarning(100, 'Unable to read entry'); } - $buffer = stream_get_contents($stream); - fclose($stream); - if (JFile::write($destination . '/' . $file, $buffer) === false) { return $this->raiseWarning(100, 'Unable to write entry'); diff --git a/libraries/vendor/joomla/archive/src/Zip.php b/libraries/vendor/joomla/archive/src/Zip.php index 785e14428abcf..6e79ce34a9099 100644 --- a/libraries/vendor/joomla/archive/src/Zip.php +++ b/libraries/vendor/joomla/archive/src/Zip.php @@ -270,8 +270,8 @@ protected function extractCustom($archive, $destination) * * @return boolean True on success * - * @since 1.0 * @throws \RuntimeException + * @since 1.0 */ protected function extractNative($archive, $destination) { @@ -285,7 +285,7 @@ protected function extractNative($archive, $destination) // Make sure the destination folder exists if (!Folder::create($destination)) { - throw new \RuntimeException('Unable to create destination folder ' . \dirname($path)); + throw new \RuntimeException('Unable to create destination folder ' . \dirname($destination)); } // Read files in the archive @@ -298,16 +298,13 @@ protected function extractNative($archive, $destination) continue; } - $stream = $zip->getStream($file); + $buffer = $zip->getFromIndex($index); - if ($stream === false) + if ($buffer === false) { throw new \RuntimeException('Unable to read ZIP entry'); } - $buffer = stream_get_contents($stream); - fclose($stream); - if (File::write($destination . '/' . $file, $buffer) === false) { throw new \RuntimeException('Unable to write ZIP entry to file ' . $destination . '/' . $file);