Created
September 30, 2011 11:43
-
-
Save polymorphm/1253520 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From dc066037384e93958a36d275b065a3d0c3938896 Mon Sep 17 00:00:00 2001 | |
From: Andrej A Antonov <[email protected]> | |
Date: Fri, 30 Sep 2011 15:31:04 +0400 | |
Subject: [PATCH] fixed zip_open() fail actions | |
--- | |
libraries/joomla/filesystem/archive/zip.php | 5 +---- | |
1 files changed, 1 insertions(+), 4 deletions(-) | |
diff --git a/libraries/joomla/filesystem/archive/zip.php b/libraries/joomla/filesystem/archive/zip.php | |
index 9b6da18..9686794 100644 | |
--- a/libraries/joomla/filesystem/archive/zip.php | |
+++ b/libraries/joomla/filesystem/archive/zip.php | |
@@ -254,10 +254,8 @@ class JArchiveZip extends JObject | |
*/ | |
protected function _extractNative($archive, $destination, $options) | |
{ | |
- if ($zip = zip_open($archive)) | |
+ if (($zip = zip_open($archive)) && is_resource($zip)) | |
{ | |
- if (is_resource($zip)) | |
- { | |
// Make sure the destination folder exists | |
if (!JFolder::create($destination)) | |
{ | |
@@ -292,7 +290,6 @@ class JArchiveZip extends JObject | |
} | |
@zip_close($zip); | |
- } | |
} | |
else | |
{ | |
-- | |
1.7.4.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment