Skip to content

Commit

Permalink
Copy the iterator into an array #72
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Feb 27, 2024
1 parent b105457 commit c0a788f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/clean/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Kirby\CLI\CLI;

$cleanContent = function (
Generator $collection,
array $collection,
array|null $ignore = null,
string|null $lang = null
): void {
Expand Down Expand Up @@ -53,7 +53,7 @@
$kirby->impersonate('kirby');

// Define your collection
$collection = $kirby->models();
$collection = iterator_to_array($kirby->models());

// set the fields to be ignored
$ignore = ['uuid', 'title', 'slug', 'template', 'sort', 'focus'];
Expand Down

0 comments on commit c0a788f

Please sign in to comment.