1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Call ksort correctly for migration files

This commit is contained in:
Moritz Lipp 2020-11-26 15:53:45 +01:00
parent 61d3737816
commit f3dcd2924c

View File

@ -252,9 +252,11 @@ class StepsController extends BaseController
$file = storage_path("migrations/{$fileName}.zip");
ksort($localMigrationData);
$zip = new \ZipArchive();
$zip->open($file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
$zip->addFromString('migration.json', json_encode(ksort($localMigrationData), JSON_PRETTY_PRINT));
$zip->addFromString('migration.json', json_encode($localMigrationData, JSON_PRETTY_PRINT));
$zip->close();
$localMigrationData['file'] = $file;