Hi

I receive the following notice on my site after installing the module for the first time:

Notice: Use of undefined constant FILE_TYPE_NONE - assumed 'FILE_TYPE_NONE' in media_type_invalid_files_count() (line 245 of /home/proots/public_html/sites/all/modules/media/includes/media.types.inc).
Notice: Use of undefined constant FILE_TYPE_NONE - assumed 'FILE_TYPE_NONE' in media_type_batch_update() (line 270 of /home/proots/public_html/sites/all/modules/media/includes/media.types.inc).
Notice: Use of undefined constant FILE_TYPE_NONE - assumed 'FILE_TYPE_NONE' in media_type_invalid_files_count() (line 245 of /home/proots/public_html/sites/all/modules/media/includes/media.types.inc).

Comments

willvincent’s picture

This is happening because FILE_TYPE_NONE is being defined in file_entity.file_api.inc, which is not loaded when media_type_invalid_files_count() and media_type_batch_update() are run during install.

I propose either moving the definition of FILE_TYPE_NONE out of that include, or doing a call to module_load_include() in media_install()

Chris Matthews’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team