- Issue created by @pfrenssen
- Status changed to Needs review
6 months ago 10:14am 10 June 2024 - Status changed to RTBC
6 months ago 10:40am 10 June 2024
When trying to edit a media entity that references an orphaned file entity, the following fatal error occurs:
Error: Call to a member function getFilename() on null in Drupal\media_name\MediaName->mediaEditFormSubmitHandler() (line 98 of /app/drupal/docroot/modules/contrib/media_name/src/MediaName.php).
This happens because MediaName::getMediaFile()
can return NULL
but its type is not checked.
Check the return value.