summaryrefslogtreecommitdiff
path: root/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'init.php')
-rw-r--r--init.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/init.php b/init.php
index 4d17845..5a117c0 100644
--- a/init.php
+++ b/init.php
@@ -175,6 +175,18 @@ class Data_Migration extends Plugin {
if (count($batch["articles"]) != $batch_size)
break;
+
+ // flush all that used memory
+ if ($zip->close() !== TRUE) {
+ Debug::log("write error while saving data to $output_file");
+ exit(3);
+ }
+ $zip = new ZipArchive();
+
+ if ($zip->open($output_file) !== TRUE) {
+ Debug::log("unable to reopen $output_file");
+ exit(3);
+ }
}
if ($zip->close() !== TRUE) {