I'm getting an error

Warning: array_keys() expects parameter 1 to be array, null given in file_entity_admin_menu_map() (line 2472 of /home/domain/public_html/folder/sites/all/modules/file_entity/file_entity.module).

I initially got a similar error with the non-dev version (on line 2463) and that's why I tried the dev. What is this error and how can it be resolved? Can't hand the site over to a client with an error displaying.

Comments

  • Dave Reid committed 2e08020 on 7.x-2.x
    Issue #2405935: Fixed file_entity_type_get_names() could return NULL...
Dave Reid’s picture

Status: Active » Fixed

Hrm, the only way this could happen is if there are no file types defined. It looks like we have a small bug in file_entity_type_get_names(), used in file_entity_admin_menu_map(), that could return NULL instead of an empty array. I've resolved it with the commit referenced above.

Could you please try the latest -dev version in a couple of hours?

Status: Fixed » Closed (fixed)

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

bdupls’s picture

I am using latest 7.x-2.0-beta1 and my logs keep showing this error.
Warning: array_keys() expects parameter 1 to be array, null given in file_entity_admin_menu_map() (line 2463 of /home/xxx/modules/contrib/file_entity/file_entity.module).
Not sure how to resolve this.

bethwhitney’s picture

Is it possible for this ticket to be reopened?
I've just installed the latest 7.x-2.0-beta1 version as well, and am getting the exact same error message as above. Was anyone able to resolve the issue? Thanks.

edited to add: I've getting closer to figuring out what may have gone wrong (upgrade and version mis-match)
If anyone else is struggling with this after upgrading from .1 , please see https://www.drupal.org/node/2043499 especially comment #15 https://www.drupal.org/node/2043499#comment-8424719 for the hints on ways to upgrade.

Dave Reid’s picture

This has already been fixed and will be included in the next release. This error does not mean anything is wrong, nor is it cause for concern. Once you create a file type, this error will go away.

bethwhitney’s picture

Thanks so much Dave.

bdupls’s picture

Enable document and image at the very least under 'admin/structure/file-types' and error disappears.