Upon visiting any page on the website (PHP errors):

Warning: include_once(/Users/me/GIT/site/public_html): failed to open stream: Undefined error: 0 in media_admin() (line 87 of /Users/me/GIT/site/public_html/sites/all/modules/media/includes/media.admin.inc).
Warning: include_once(): Failed opening '' for inclusion (include_path='.:/Applications/MAMP/bin/php/php5.4.34/lib/php') in media_admin() (line 87 of /Users/me/GIT/site/public_html/sites/all/modules/media/includes/media.admin.inc).

And upon trying to view admin/content/media (WSOD):

Fatal error: Function name must be a string in /Users/me/GIT/site/public_html/sites/all/modules/media/includes/media.admin.inc on line 89

I've reverted to older and older commits and database backups, but I cannot escape the same errors, which were simply not happening before. This is also happening on the remote server we pushed it to, where likewise it was not happening before.

I upgraded from 1.4 to 1.5 but there was no change.

Please help - these errors have totally hamstrung our project!

Recent modules we installed whereafter we started running into these problems:

- webform_entity
- amazons3
- amazons3_cors
- composer_manager
- profile2
- field_permissions

However, we just reverted everything back to before these modules were installed, and having the same errors.

Comments

amaisano’s picture

Status: Active » Closed (cannot reproduce)

Reverted far enough back to recreate my steps, and was unable to reproduce.

tejasvi.c.h’s picture

Just tried to figure out the cause of this issue and I observed problem in initializing $types = media_display_types() in line 35 of media/includes/media.admin.inc.
media_display_types() is defined in media.module, which returns the list of display types by invoking all the hooks of 'media_display_types'.
Media module's own implementation of this hook resides in media/media.media.inc file, but it was not available in media.module since 'media/media.media.inc' is not included in media.module.

I Just included below line of code at line 27 of media.module which worked for me.

require_once (dirname(__FILE__) . '/media.media.inc');

amaisano’s picture

Issue summary: View changes

anonymizing error details

sumit.prajapati’s picture

When we are upgrade php 5.5 to php7.3 then we have got this error -
Function name must be a string in media_admin() (line 89 of media/includes/media.admin.inc)

#2 its working for me.

joseph.olstad’s picture

Title: Fatal errors and warnings with media.admin.inc file » php 7.3.x support - Fatal errors and warnings with media.admin.inc file
Assigned: Unassigned » joseph.olstad
Category: Support request » Bug report
Priority: Major » Normal
Status: Closed (cannot reproduce) » Needs review
Issue tags: +php7.3

Tagging this as a php7.3 compatibility issue.

Need a patch to be made off of #2

joseph.olstad’s picture

patch please? then we can run automated tests on it

joseph.olstad’s picture

Still waiting for a patch as described. Thanks.

joseph.olstad’s picture

on radar, patch would help if someone wants to pitch in for the win.

  • joseph.olstad committed 02df124 on 7.x-1.x
    Issue #2528562 by joseph.olstad, amaisano, tejaswi.c.h, s.prajapati: php...
joseph.olstad’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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