moodle/lib/filestorage
Eloy Lafuente (stronk7) 70ae75674d MDL-51863 packer: ensure empty zip files behavior remains consistent
With PHP bug #70322 fixed, ZipArchive::close() did start returning false
and throwing PHP Warnings with recent PHP versions (5.6.14 and up).
Previously (5.6.13 verified) it was returning true, and false in older
versions (5.4.x verified).

This change does silent the 2 "hacky" calls to close() that we perform
in core leaving the 3rd one (used for files having files) unmodified.

A new unit test has been created to cover the close() behavior, ideally
supporting both old and new PHP versions without harcoding any PHP
version.

Note that we don't use to rely much on results coming from close(), and
that's a good thing given the buggy behavior commented above. This just
keeps empty zips working like they were before.
2015-10-26 21:16:54 +01:00
..
tests MDL-51863 packer: ensure empty zip files behavior remains consistent 2015-10-26 21:16:54 +01:00
file_archive.php MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
file_exceptions.php MDL-44315 phpdoc: fixed up typos and made up tags 2014-02-24 09:13:31 +13:00
file_packer.php MDL-41838 Files: Implement .tar.gz packer (1 of 2) 2013-10-08 13:04:48 +01:00
file_progress.php MDL-41838 Files: Implement .tar.gz packer (1 of 2) 2013-10-08 13:04:48 +01:00
file_storage.php MDL-49627 core: Update uses of generate_image_thumbnail 2015-04-01 11:05:19 +08:00
mbz_packer.php MDL-49298 backup: Make tgz file format standard for backups 2015-03-05 10:07:58 -05:00
stored_file.php MDL-49627 core: Improve thumbnail generation 2015-04-01 11:05:19 +08:00
tgz_extractor.php MDL-43794 Files API Set the mtime of files to extraction time. 2014-01-22 11:06:39 -05:00
tgz_packer.php MDL-43402 remove all zlib detection code 2013-12-27 11:06:18 +08:00
zip_archive.php MDL-51863 packer: ensure empty zip files behavior remains consistent 2015-10-26 21:16:54 +01:00
zip_packer.php MDL-41839 Files: Zip packer progress minor bugs 2013-09-17 14:19:07 +01:00