1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 12:10:45 +02:00

Fix issue in ProcessPageEditLink when a FieldtypeFieldsetPage field is on the page

This commit is contained in:
Ryan Cramer
2017-09-03 05:58:21 -04:00
parent 34519c4ad3
commit d427b7f563

View File

@@ -373,11 +373,16 @@ class ProcessPageEditLink extends Process implements ConfigurableModule {
} }
} else if(wireInstanceOf($type, 'FieldtypeRepeater')) { } else if(wireInstanceOf($type, 'FieldtypeRepeater')) {
$value = $page->get($field->name); $value = $page->get($field->name);
if($value) foreach($page->get($field->name) as $repeaterPage){ if($value) {
if($value instanceof Page) $value = array($value);
if(WireArray::iterable($value)) {
foreach($value as $repeaterPage) {
$files = array_merge($this->getFilesPage($repeaterPage, $field->getLabel() . ': '), $files); $files = array_merge($this->getFilesPage($repeaterPage, $field->getLabel() . ': '), $files);
} }
} }
} }
}
}
return $files; return $files;
} }