Warning appears when using Administration Menu selec and Media module

Drupal and module versions:
Drupal 7.14
Administration Menu select 7.x-1.2
Media 7.x-2.0-unstable5

When adding image to a media field and media browser popup shows up, there is a warning:

Warning: Missing argument 1 for admin_select_suppress() in admin_select_suppress() (line 189 of /sites/all/modules/admin_select/admin_select.module).

Proposed resolution

To fix this I changed line 189 in file sites/all/modules/admin_select/admin_select.module from this:

function admin_select_suppress($item) {

to this:

function admin_select_suppress($item = array) {


Dave Reid’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
686 bytes

Yes I noticed this earlier too. hook_suppress() is defined by admin_menu and other modules to not inject input. We should rename admin_select_suppress() to admin_select_suppress_item() to avoid the hook conflict.

Dave Reid’s picture

Status: Needs review » Fixed

Committed #1 to Git.

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