Skip to content

Commit

Permalink
Prevent overwriting the entry variable. Prevents title, slug, parent,…
Browse files Browse the repository at this point in the history
… etc from incorrectly falling back to the root value. #2211
  • Loading branch information
jasonvarga committed Aug 26, 2020
1 parent 77acada commit 2059206
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Http/Controllers/CP/Collections/EntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 2059206

Please sign in to comment.