Commit fd7d2d7f authored by netsliver's avatar netsliver Committed by izus
Browse files

Issue #2896418 by izus, netsliver: Avoid indexing error if media is null

parent 682abdf1
......@@ -212,7 +212,7 @@ class FilesExtractor extends ProcessorPluginBase implements PluginFormInterface
foreach ($filefield_values as $media_value) {
$media = Media::load($media_value['target_id']);
// Supporting only the default media file field for now.
if ($media->bundle() == 'file') {
if ($media && $media->bundle() == 'file') {
$mediafilefield_values = $media->field_media_file->getValue();
foreach ($mediafilefield_values as $filefield_value) {
$all_fids[] = $filefield_value['target_id'];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment