From f3dcd2924cc167c057e2d109ddc156eb898bc913 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Thu, 26 Nov 2020 15:53:45 +0100 Subject: [PATCH] Call ksort correctly for migration files --- app/Http/Controllers/Migration/StepsController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Migration/StepsController.php b/app/Http/Controllers/Migration/StepsController.php index 4a9889281d..52007b8e58 100644 --- a/app/Http/Controllers/Migration/StepsController.php +++ b/app/Http/Controllers/Migration/StepsController.php @@ -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;