Title: call_user_func_array(): Argument #1 ($callback) must be a valid callback
Last modified: October 27, 2023

---

# call_user_func_array(): Argument #1 ($callback) must be a valid callback

 *  [moonplb](https://wordpress.org/support/users/moonplb/)
 * (@moonplb)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/call_user_func_array-argument-1-callback-must-be-a-valid-callback/)
 * Hi,
 * I am new here. I am getting this error while viewing any of my WordPress page
   or post “
 * **Fatal error**: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback)
   must be a valid callback, no array or string given in E:\xampp\htdocs\wordpress\
   wp-includes\class-wp-hook.php:308 Stack trace: #0 E:\xampp\htdocs\wordpress\wp-
   includes\class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #1 E:\xampp\
   htdocs\wordpress\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #2 E:\
   xampp\htdocs\wordpress\wp-includes\general-template.php(3049): do_action(‘wp_head’)#
   3 E:\xampp\htdocs\wordpress\wp-includes\template-canvas.php(17): wp_head() #4
   E:\xampp\htdocs\wordpress\wp-includes\template-loader.php(106): include(‘E:\\
   xampp\\htdocs…’) #5 E:\xampp\htdocs\wordpress\wp-blog-header.php(19): require_once(‘
   E:\\xampp\\htdocs…’) #6 E:\xampp\htdocs\wordpress\index.php(17): require(‘E:\\
   xampp\\htdocs…’) #7 {main} thrown in **E:\xampp\htdocs\wordpress\wp-includes\
   class-wp-hook.php** on line **308**
 * “
 * I was basically making a plugin. The plugin works fine in live server or website.
   But in localhost, I am getting that fatal error and am unable to view any post
   or page. I am unable to debug or catch the problem because I don’t know which
   callback function and argument I need to update? May I get solution about what
   callback function and argument I need to update?
    -  This topic was modified 3 years, 1 month ago by [moonplb](https://wordpress.org/support/users/moonplb/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcall_user_func_array-argument-1-callback-must-be-a-valid-callback%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/call_user_func_array-argument-1-callback-must-be-a-valid-callback/#post-16679894)
 * Look in your code for a function call like
 *     ```wp-block-code
       add_filter();
       ```
   
 * or
 *     ```wp-block-code
       add_filter(null, 'custom_function_name');
       ```
   
 * Because obviously some filter hook is called without a filter name.
 * For further debugging you could also test your code and comment out parts to 
   see if the commented out part is responsible.
 *  Thread Starter [moonplb](https://wordpress.org/support/users/moonplb/)
 * (@moonplb)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/call_user_func_array-argument-1-callback-must-be-a-valid-callback/#post-16680484)
 * Hi Threadi,
 * Thanks for your guide. Let me debug regarding your guide.
 *  [Tim](https://wordpress.org/support/users/greller/)
 * (@greller)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/call_user_func_array-argument-1-callback-must-be-a-valid-callback/#post-16875741)
 * Thanks, this helped me a lot!
   I just want to add, that it doesn’t has to be a
   filter, but can also be an action that isn’t added properly. In my case it was:
 *     ```wp-block-code
       add_action('wp_head', /* something that returned null */);
       ```
   

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

The topic ‘call_user_func_array(): Argument #1 ($callback) must be a valid callback’
is closed to new replies.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 3 replies
 * 5 participants
 * Last reply from: [Tim](https://wordpress.org/support/users/greller/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/call_user_func_array-argument-1-callback-must-be-a-valid-callback/#post-16875741)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
