Title: [Plugin: NextGEN Gallery] Warning: call_user_func_array() &#8230; /plugin.php on line 311
Last modified: August 19, 2016

---

# [Plugin: NextGEN Gallery] Warning: call_user_func_array() … /plugin.php on line 311

 *  [s0what](https://wordpress.org/support/users/s0what/)
 * (@s0what)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/)
 * Warning: call_user_func_array() [function.call-user-func-array]: First argument
   is expected to be a valid callback, ‘media_admin_css’ was given in /webhotels/
   domains/www.susts.lv/www/wp-includes/plugin.php on line 311
 * This probably is because of broken file, but I can’t find the broken one.

Viewing 15 replies - 1 through 15 (of 15 total)

 *  [bee-dudler](https://wordpress.org/support/users/bee-dudler/)
 * (@bee-dudler)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801162)
 * Hi,
    your wordpress is 2.62 ? a beta i guess. Maybe that’s where the problem 
   is coming from. In gallery/admin/25/media-upload.php in line 53 you will find`
   add_action('admin_head_media_upload_nextgen_form', 'media_admin_css');` but this
   file is only called in nggallery.php `if (IS_WP25)` this you can find four times
   in that file. which means in short that nggallery is not prepared for wp betas.
   You may try to change all four to `if (IS_WP26)` and see what happens.
 * best regards
    bee
 *  Thread Starter [s0what](https://wordpress.org/support/users/s0what/)
 * (@s0what)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801215)
 * I changed to (IS_WP26), but nothing new happens, I still got the same warning.
 *  [bee-dudler](https://wordpress.org/support/users/bee-dudler/)
 * (@bee-dudler)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801219)
 * Hi,
    `define('IS_WP25', version_compare($wp_version, '2.4', '>=') );` line 56
   was overseen yesterday by me maybe you add a line which is according to 2.6.
 * best regards
    bee
 *  Thread Starter [s0what](https://wordpress.org/support/users/s0what/)
 * (@s0what)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801220)
 * Hello! 🙂
 * you mean that it should look like that:
 * define(‘IS_WP25’, version_compare($wp_version, ‘2.6’, ‘>=’) );
    ? Whith that 
   I got the same error.
 * If I make it like that:
 * define(‘IS_WP26’, version_compare($wp_version, ‘2.6’, ‘>=’) );
    then plugin doesn’t
   work at all.
 * define(‘IS_WP26’, version_compare($wp_version, ‘2.4’, ‘>=’) );
    doesn’t work 
   also.
 *  [bee-dudler](https://wordpress.org/support/users/bee-dudler/)
 * (@bee-dudler)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801222)
 * Hi,
    last try ok? `define('IS_WP26', version_compare($wp_version, '2.5', '>='));`
   would be in the logic i guess
 * best regards
    bee
 *  Thread Starter [s0what](https://wordpress.org/support/users/s0what/)
 * (@s0what)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801223)
 * 🙁 define(‘IS_WP26’, version_compare($wp_version, ‘2.5’, ‘>=’) );
 * not working.
 *  Thread Starter [s0what](https://wordpress.org/support/users/s0what/)
 * (@s0what)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801224)
 * I installed WP 2.6Beta3 on other server and gallery works fine on it, so this
   probably is not a version problem.. 🙁
 *  [bee-dudler](https://wordpress.org/support/users/bee-dudler/)
 * (@bee-dudler)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801225)
 * Then maybe a beta 2.62 problem.
    best regards bee
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801227)
 * NextGEN will support WP 2.6 after the first RC.
 * Required changes :
 *     ```
       // not longer needed for wp2.6
       if ( !function_exists('wp_enqueue_style') )
       add_action('admin_head_media_upload_nextgen_form', 'media_admin_css');
       ```
   
 * [http://code.google.com/p/nextgen-gallery/source/diff?r=225&format=side&path=/trunk/admin/media-upload.php](http://code.google.com/p/nextgen-gallery/source/diff?r=225&format=side&path=/trunk/admin/media-upload.php)
 *  [xxxevilgrinxxx](https://wordpress.org/support/users/xxxevilgrinxxx/)
 * (@xxxevilgrinxxx)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801306)
 * I’ve had that issue with the Flexible Upload plug in as well. Disabling the plugin
   worked nicely 🙂
 *  [phillycp](https://wordpress.org/support/users/phillycp/)
 * (@phillycp)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801320)
 * After commenting out the line alexrabe shows, call the media.css file from fup_admin_header
   at the top of the file like so:
 *     ```
       function fup_admin_header() {
           global $fup_rel_dir;
           wp_enqueue_script('fup_swfupload',
                             '/'.$fup_rel_dir.'flexible-upload-wp25js.php',
                             array('prototype'), false);
   
          echo '<link rel="stylesheet" href="'. get_option('home') .'/wp-admin/css/media.css?ver=20080709" type="text/css" />'. "\n";
   
       }
       ```
   
 *  [comprido](https://wordpress.org/support/users/comprido/)
 * (@comprido)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801322)
 * That´s it xxxevilgrinxxx, same problem with the “Add Media” button.
 * “Warning: call_user_func_array() [function.call-user-func-array]: First argument
   is expected to be a valid callback, ‘media_admin_css’ was given in /home/…/wp-
   includes/plugin.php on line 311”
 * If you deactivate the flexible upload plugin the problem is solve.
 *  [asgard](https://wordpress.org/support/users/asgard/)
 * (@asgard)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801330)
 * I am having this same problem. Disabling Flexible Upload gets rid of it but now
   when I click on images I have added to a post, it stops showing as a pop up thick
   box, but just opens as an image.
 * I basically have to set the images up in a NextGEN gallery to be able to get 
   that effect.
 *  [alnmedia](https://wordpress.org/support/users/alnmedia/)
 * (@alnmedia)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801398)
 * I got this same error today. Everything was working fine earlier. Now I get the
   error.
 * After trying to deactivate the plugin i get this error.
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/content/a/l/n/alnmedia/html/blog/wp-config.php:29) in /home/content/
   a/l/n/alnmedia/html/blog/wp-includes/pluggable.php on line 770
 *  [visualadventures](https://wordpress.org/support/users/visualadventures/)
 * (@visualadventures)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801422)
 * past this into the bottom of the includes/plugin.php file
    if( ! function_exists(‘
   media_admin_css’) ){ function media_admin_css(){ wp_admin_css(‘css/media’); }}
 * should go just above the end php tag (?>)

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘[Plugin: NextGEN Gallery] Warning: call_user_func_array() … /plugin.php
on line 311’ is closed to new replies.

 * 15 replies
 * 9 participants
 * Last reply from: [visualadventures](https://wordpress.org/support/users/visualadventures/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-warning-call_user_func_array-pluginphp-on-line-311/#post-801422)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
