Skip to content

Commit 0bcb3f8

Browse files
committed
fix: need to check the keys!
1 parent 3c186a1 commit 0bcb3f8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Migration/Sources/CSV.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,10 @@ private function withCsvStream(callable $fn): void
287287
/**
288288
* @throws \Exception
289289
*/
290-
private function validateCSVHeaders(array $headers, array $expectedAttributes): void
290+
private function validateCSVHeaders(array $headers, array $attributeTypes): void
291291
{
292+
$expectedAttributes = array_keys($attributeTypes);
293+
292294
// Ignore keys like $id, $permissions, etc.
293295
$filteredHeaders = array_filter($headers, fn ($key) => ! str_starts_with($key, '$'));
294296

0 commit comments

Comments
 (0)