Title: Warning: call_user_func_array() errors
Last modified: August 21, 2016

---

# Warning: call_user_func_array() errors

 *  Resolved [morningmist](https://wordpress.org/support/users/morningmist/)
 * (@morningmist)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/)
 * The website I am working on got completely deleted and then we uploaded a back
   up then we have had these function errors. Suggestion how to fix?
 * Here are the errors:
 * > Warning: call_user_func_array() expects parameter 1 to be a valid callback,
   > function ‘do_css’ not found or invalid function name in /home/fresheye/public_html/
   > rentlucky.com/wp-includes/plugin.php on line 470
   > Warning: call_user_func_array() expects parameter 1 to be a valid callback,
   > function ‘do_jslibs’ not found or invalid function name in /home/fresheye/public_html/
   > rentlucky.com/wp-includes/plugin.php on line 470
 * Here is the line it refers to:
 * `* @return null Will return null if $tag does not exist in $wp_filter array`
 * Here is the whole section:
 *     ```
       /**
        * Execute functions hooked on a specific action hook, specifying arguments in an array.
        *
        * @see do_action() This function is identical, but the arguments passed to the
        * functions hooked to <tt>$tag</tt> are supplied using an array.
        *
        * @package WordPress
        * @subpackage Plugin
        * @since 2.1
        * @global array $wp_filter Stores all of the filters
        * @global array $wp_actions Increments the amount of times action was triggered.
        *
        * @param string $tag The name of the action to be executed.
        * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
        * @return null Will return null if $tag does not exist in $wp_filter array
        */
       function do_action_ref_array($tag, $args) {
       	global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
   
       	if ( ! isset($wp_actions[$tag]) )
       		$wp_actions[$tag] = 1;
       	else
       		++$wp_actions[$tag];
   
       	// Do 'all' actions first
       	if ( isset($wp_filter['all']) ) {
       		$wp_current_filter[] = $tag;
       		$all_args = func_get_args();
       		_wp_call_all_hook($all_args);
       	}
   
       	if ( !isset($wp_filter[$tag]) ) {
       		if ( isset($wp_filter['all']) )
       			array_pop($wp_current_filter);
       		return;
       	}
   
       	if ( !isset($wp_filter['all']) )
       		$wp_current_filter[] = $tag;
   
       	// Sort
       	if ( !isset( $merged_filters[ $tag ] ) ) {
       		ksort($wp_filter[$tag]);
       		$merged_filters[ $tag ] = true;
       	}
   
       	reset( $wp_filter[ $tag ] );
   
       	do {
       		foreach( (array) current($wp_filter[$tag]) as $the_ )
       			if ( !is_null($the_['function']) )
       				call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
   
       	} while ( next($wp_filter[$tag]) !== false );
   
       	array_pop($wp_current_filter);
       }
       ```
   

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4815799)
 * More than likely the file containing the declarations for `do_css()` and `do_jslibs()`
   is not getting included or required for some reason.
 *  Thread Starter [morningmist](https://wordpress.org/support/users/morningmist/)
 * (@morningmist)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4815802)
 * How do I find that file and how do I fix it?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4815904)
 * Use `grep` or similar (anything that does a full text search in all files and
   recurses into sub-directories) to search for `function do_css` in _wp-content_.
   Same for `function do_jslibs()`. How to fix it is harder to say. The file needs
   to be included or required through any chain of similar references from the main
   code file, _functions.php_ for themes and whatever file has the plugin header
   for plugins.
 * If it’s not code you have anything to do with, you should probably contact the
   theme or plugin author responsible.
 *  Thread Starter [morningmist](https://wordpress.org/support/users/morningmist/)
 * (@morningmist)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4815941)
 * I finally figured it out. Turns out it was related to the plugin tinyMCE Advanced
   and I just needed to add the following code to my functions.php file. I added
   it to the bottom of the file just before the closing tag.
 *     ```
       //css and jslibs
   
        function do_css()
       {
           wp_enqueue_style('thickbox');
       }
   
       function do_jslibs()
       {
           wp_enqueue_script('editor');
           wp_enqueue_script('thickbox');
           add_action( 'admin_head', 'wp_tiny_mce' );
       }
   
       add_action('admin_print_scripts', 'do_jslibs' );
       add_action('admin_print_styles', 'do_css' );
       ```
   
 * Just adding the solution just in case someone else ends up with the same error.
 *  [WebDi](https://wordpress.org/support/users/webdi/)
 * (@webdi)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816145)
 * [@morningmist](https://wordpress.org/support/users/morningmist/),
 * How did you figure out which plugin was causing the trouble? I’m getting the 
   same error, but am not using that plugin.
 *  Thread Starter [morningmist](https://wordpress.org/support/users/morningmist/)
 * (@morningmist)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816146)
 * [@webdi](https://wordpress.org/support/users/webdi/) A lot of searching and reading
   and trial and error. I tried a number of things and this was the only solution
   that worked.
 *  [WebDi](https://wordpress.org/support/users/webdi/)
 * (@webdi)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816147)
 * Hmm, I’ve disable each plugin one at a time and still get the error. So it doesn’t
   seem to be a plugin in my case.
 *  Thread Starter [morningmist](https://wordpress.org/support/users/morningmist/)
 * (@morningmist)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816148)
 * [@webdi](https://wordpress.org/support/users/webdi/) I tried that too to be honest
   and it did not work.
 *  [pinkchick](https://wordpress.org/support/users/pinkchick/)
 * (@pinkchick)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816180)
 * I have similar problem, could you pleas write me the code for me and where to
   paste it.
 * Warning: call_user_func_array() expects parameter 1 to be a valid callback, function‘
   GGP_registerTextDomain’ not found or invalid function name in /www/wp-includes/
   plugin.php on line 470
 *  Thread Starter [morningmist](https://wordpress.org/support/users/morningmist/)
 * (@morningmist)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816181)
 * [@pinkchick](https://wordpress.org/support/users/pinkchick/) have you tried disabling
   the plugins one at a time?
 * You have a similar problem but you need to determine first what plugin is causing
   the problem.
 *  [pinkchick](https://wordpress.org/support/users/pinkchick/)
 * (@pinkchick)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816182)
 * solved thank you

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

The topic ‘Warning: call_user_func_array() errors’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 11 replies
 * 4 participants
 * Last reply from: [pinkchick](https://wordpress.org/support/users/pinkchick/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/warning-call_user_func_array-errors/#post-4816182)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
