diff --git a/src/Http/Controllers/CP/Collections/EntriesController.php b/src/Http/Controllers/CP/Collections/EntriesController.php index 66c7ca525d..131b90c523 100644 --- a/src/Http/Controllers/CP/Collections/EntriesController.php +++ b/src/Http/Controllers/CP/Collections/EntriesController.php @@ -324,10 +324,11 @@ protected function extractFromFields($entry, $blueprint) { // The values should only be data merged with the origin data. // We don't want injected collection values, which $entry->values() would have given us. - $values = $entry->data(); - while ($entry->hasOrigin()) { - $entry = $entry->origin(); - $values = $entry->data()->merge($values); + $target = $entry; + $values = $target->data(); + while ($target->hasOrigin()) { + $target = $target->origin(); + $values = $target->data()->merge($values); } $values = $values->all();