I got this notice:

Notice: Use of undefined constant FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS - assumed 'FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS' i media_variable_default() (row 133 in /media/includes/media.variables.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ParisLiakos’s picture

which file_entity version you have?

greenwork’s picture

I got this too with 7.x-2.0-unstable7+2-dev File Entity after install

ParisLiakos’s picture

Title: notice warning » convert FILE_ENTITY_DEFAULT_ALLOWED_EXTENSIONS to the new variable
Version: 7.x-2.0-unstable7 » 7.x-2.x-dev
Priority: Minor » Normal

Yeap, i just made a commit there that swaps the constant with a variable.
need to convert it in media module as well

something like this
http://drupalcode.org/project/file_entity.git/blobdiff/3779389cffdbb49a0...

mrfelton’s picture

Status: Active » Needs review
FileSize
799 bytes
ParisLiakos’s picture

Status: Needs review » Fixed
jpstrikesback’s picture

Status: Fixed » Needs review
FileSize
780 bytes

There was one place this is called in media.module, patch attached with a variable_get('file_entity_default_allowed_extensions') seems to sort it out.

ParisLiakos’s picture

Status: Needs review » Needs work

Nice catch jpstrikesback!
But maybe we should use media_variable_get for consistency

mrfelton’s picture

Status: Needs work » Needs review
FileSize
863 bytes

> maybe we should use media_variable_get for consistency

No that doesn't make sense here - we are trying to compare against the value provided by file_entity, not the value of one of media's variables. I think the above patch is correct, although the standard is to include the default value in the vall to variable_get. Patch updated.

jpstrikesback’s picture

And good catch on the default value, wasn't sure if it was needed but it can only help.

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community

Ah, i am sorry, i didnt notice the context
You are right thanks again

ParisLiakos’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.