Skip to content

Commit 31d1c2e

Browse files
fix: Missing lang
1 parent 152314d commit 31d1c2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

commands/clean/content.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
// get the keys and normalize to lowercase
2727
$originalContentKeys = array_keys($contentFields);
28-
$contentFieldKeys = array_map('mb_strtolower', $originalContentKeys);
28+
$contentFieldKeys = array_map('mb_strtolower', $originalContentKeys);
2929

3030
// get all field keys from blueprint and normalize to lowercase
31-
$blueprintFields = array_keys($item->blueprint()->fields());
31+
$blueprintFields = array_keys($item->blueprint()->fields());
3232
$blueprintFieldKeys = array_map('mb_strtolower', $blueprintFields);
3333

3434
// get all field keys that are in $contentFieldKeys but not in $blueprintFieldKeys
@@ -53,7 +53,7 @@
5353
}
5454

5555
// don't update models that have changes
56-
if ($item->version('changes')->exists() === true) {
56+
if ($item->version('changes')->exists($lang) === true) {
5757
$cli->error('The ' . $item::CLASS_ALIAS . ' (' . $item->id() . ') has changes and cannot be cleaned. Save the changes and try again.');
5858
}
5959

@@ -68,7 +68,7 @@
6868
// check if the version exists for the given language
6969
// and try to update the page with the data
7070
if ($version->exists($lang) === true) {
71-
$version->update($data);
71+
$version->update($data, $lang);
7272
}
7373
}
7474
};

0 commit comments

Comments
 (0)