mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
fix problem with assumedly broken ZipArchives with OpenOffice Documents used with ZipArchive on SLES11; try opening the archive anyway, even if the onening with CHECKCONS failes. Report that to error_log, and try to proceed before failing fataly
This commit is contained in:
parent
0efb958fa1
commit
85ec9e5a53
@ -694,7 +694,11 @@ abstract class bo_merge
|
||||
if (isset($archive))
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
if ($zip->open($archive,ZIPARCHIVE::CHECKCONS) !== true) throw new Exception("!ZipArchive::open('$archive',ZIPARCHIVE::OVERWRITE)");
|
||||
if ($zip->open($archive,ZIPARCHIVE::CHECKCONS) !== true)
|
||||
{
|
||||
error_log(__METHOD__.__LINE__." !ZipArchive::open('$archive',ZIPARCHIVE::CHECKCONS) failed. Trying open without validating");
|
||||
if ($zip->open($archive) !== true) throw new Exception("!ZipArchive::open('$archive',|ZIPARCHIVE::CHECKCONS)");
|
||||
}
|
||||
if ($zip->addFromString($content_file,$merged) !== true) throw new Exception("!ZipArchive::addFromString('$content_file',\$merged)");
|
||||
if ($zip->close() !== true) throw new Exception("!ZipArchive::close()");
|
||||
unset($zip);
|
||||
|
Loading…
Reference in New Issue
Block a user