Skip to content

A free open source IT asset/license management system

Closure wasn’t working, go traditional

snipe0058f02e828c
diff --git a/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php b/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php
index 0d9f2c8cfd..accc3e34bb 100644
--- a/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php
+++ b/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php
@@ -70,13 +70,16 @@ class MigrateDenormedAssetLocations extends Migration
\Log::info('Asset: '.$unassigned_asset->id.' still has no location');
}
- Asset::get()->each(function ($asset) {
+ $assets = Asset::get();
+
+ foreach ($assets as $asset) {
if (($asset) && ($asset->location_id != $asset->assetLoc()->id)) {
- \Log::info('MISMATCH MISMATCH '.$asset->id. "doesn't match its location");
+ \Log::info('MISMATCH MISMATCH '.$asset->id. "doesn't match its location");
}
- });
+ }
+
- die();
+
}
/**