Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Mubashar Ahmad committed Aug 22, 2022
1 parent 89c68fa commit 9ab79b9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Zip.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace ZanySoft\Zip;

use \ZipArchive;
use \Exception;
use Exception;
use ZipArchive;

/**
* ZanySoft\Zip - ZipArchive toolbox
Expand Down Expand Up @@ -633,7 +633,12 @@ private static function openZipFile($zip_file, $flags = null)
{
$zip = new ZipArchive();

$open = $zip->open($zip_file, $flags);
if (is_null($flags)) {
$open = $zip->open($zip_file);
} else {
$open = $zip->open($zip_file, $flags);
}


if ($open !== true) {
throw new \Exception(self::getStatus($open));
Expand Down

0 comments on commit 9ab79b9

Please sign in to comment.