mirror of
https://github.com/jbcr/core.git
synced 2026-03-31 13:22:09 +02:00
Merge pull request #975 from bolt/bobdenotter-patch-1
Get the first imagefield that actually has an image in it
This commit is contained in:
@@ -139,7 +139,7 @@ class ContentExtension extends AbstractExtension
|
||||
}
|
||||
|
||||
foreach ($content->getFields() as $field) {
|
||||
if ($field instanceof ImageField) {
|
||||
if ($field instanceof ImageField && $field->get('filename')) {
|
||||
return $onlyValues ? $field->getValue() : $field;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user