diff options
-rw-r--r-- | init.php | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -173,6 +173,9 @@ class Data_Migration extends Plugin { $zip->addFromString($batch_filename, json_encode($batch)); + 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"); @@ -184,8 +187,6 @@ class Data_Migration extends Plugin { Debug::log("unable to reopen $output_file"); exit(3); } - if (count($batch["articles"]) != $batch_size) - break; } if ($zip->close() !== TRUE) { |