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

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()