Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, no array or string given in class-wp-hook.php:308 #29

Open
moonakondo opened this issue Apr 24, 2023 · 0 comments

Comments

@moonakondo
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant