Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 925
    • Issues 925
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #769

Closed
Open
Opened Feb 28, 2019 by Edselopez@EdselopezDeveloper

ZIP Archive for multiple batch exports fail

There is an issue with the ZipArchive class' open() method. In previous versions of PHP when the only flag passed to the method was the ZipArchive::OVERWRITE, the method also created non-existing archives.

Since PHP 5.6 the OVERWRITE flag alone cannot create new archives which breaks compatibility.

Test script:

// Open new archive in cwd based on timestamp

$zip = new ZipArchive();

$open = $zip->open(time() . '.zip', ZipArchive::OVERWRITE);

echo $open;

Expected result:

Expected behavior: The new archive is opened as in the previous version.

Actual result:

In PHP 5.5 an empty archive is opened.

In PHP 5.6 ZipArchive::ER_OPEN error code is returned (cannot open zip file).

Edited Feb 28, 2019 by Edselopez
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
5.12.0
Milestone
5.12.0 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#769