Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Clicking on "Content -> Media" from administrator interface, if no file exists in your media folder, you can see the errors:
--
- Notice: Undefined index: file in media_admin_thumbnails() (line 167 of /my/path/sites/all/modules/media/includes/media.admin.inc).
- Warning: array_keys() expects parameter 1 to be array, null given in media_admin_thumbnails() (line 167 of /my/path/sites/all/modules/media/includes/media.admin.inc).
--
To solve this problem, in the above file I
- add at 166: if (!empty($result)){
- and close it at 187: }
It seems to work: I hope it is correct.
Comments
Comment #1
ParisLiakos CreditAttribution: ParisLiakos commentedthis is about the media module,right?
Comment #2
rszrama CreditAttribution: rszrama commentedYep, and it's a duplicate of #1056718: Thumbnail view without added media gives errors.