Title: PHP Warning: call_user_func_array() on wp-includes/plugin.php line 406
Last modified: August 21, 2016

---

# PHP Warning: call_user_func_array() on wp-includes/plugin.php line 406

 *  [rabmcnab](https://wordpress.org/support/users/rabmcnab/)
 * (@rabmcnab)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-on-wp-includespluginphp-line-406/)
 * Hope this isn’t a dupe, I don’t think so. Love the plugin, include it in themes
   religiously – a big thanks.
 * I have an issue I don’t seem to be able to fix, OT still works but is throwing
   numerous PHP warnings in the media uploader when used in conjunction with another
   plugin ([http://wordpress.org/extend/plugins/wp-filebase/](http://wordpress.org/extend/plugins/wp-filebase/)).
 * The error is;
 * `Warning: call_user_func_array() [function.call-user-func-array]: First argument
   is expected to be a valid callback, 'ot_after_theme_options_save' was given in
   xxx\wp-includes\plugin.php on line 406`
 * And it is thrown for the following hooks in ot-loader.php;
 *     ```
       /* prepares the after save do_action */
             add_action( 'admin_init', array( &$this, 'ot_after_theme_options_save' ), 1 );
   
             /* default settings */
             add_action( 'admin_init', 'ot_default_settings', 2 );
   
             /* add xml to upload filetypes array */
             add_action( 'admin_init', 'ot_add_xml_to_upload_filetypes', 3 );
   
             /* import */
             add_action( 'admin_init', 'ot_import', 4 );
   
             /* export */
             add_action( 'admin_init', 'ot_export', 5 );
   
             /* save settings */
             add_action( 'admin_init', 'ot_save_settings', 6 );
   
             /* save layouts */
             add_action( 'admin_init', 'ot_modify_layouts', 7 );
   
             /* create media post */
             add_action( 'admin_init', 'ot_create_media_post', 8 );
       ```
   
 * Looking into it, it seems to relate to this issue,
 * [http://wordpress.stackexchange.com/questions/82245/warning-error-in-admin-panel-while-developing-theme](http://wordpress.stackexchange.com/questions/82245/warning-error-in-admin-panel-while-developing-theme)
 * And whilst Filebase Pro is handling things in the way shown in the Stack above,
   Options Tree isn’t (which is why I’ve posted here – rightly or wrongly). I’ve
   tried all kinds of juggling to redo it so it will handle the hook in the same
   manner, however this;
 *     ```
       /* prepares the after save do_action */
       add_action( 'admin_init', array( &$this, 'ot_after_theme_options_save' ), 1 );
       ```
   
 * Will throw the following warning in the backend no matter what;
 * `First argument is expected to be a valid callback, 'OT_Loader::ot_after_theme_options_save'
   was given in C:\wamp\www\bartlett\wp-includes\plugin.php on line 406`
 * I’ve tried on PHP 5.2.x and 5.3.x, no joy. It’s not a huge disaster fo me as 
   I’ll have the error reporting off on the live site but it’s one of those things
   that eats away at you. I hoped you might have some insight. Thanks for any help
   and the thanks again for the plugin Derek.
 * [http://wordpress.org/extend/plugins/option-tree/](http://wordpress.org/extend/plugins/option-tree/)

The topic ‘PHP Warning: call_user_func_array() on wp-includes/plugin.php line 406’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/option-tree_363534.svg)
 * [OptionTree](https://wordpress.org/plugins/option-tree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/option-tree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/option-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/option-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/option-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/option-tree/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 0 replies
 * 1 participant
 * Last reply from: [rabmcnab](https://wordpress.org/support/users/rabmcnab/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-on-wp-includespluginphp-line-406/)
 * Status: not resolved