Support » Plugin: Timber » Warning: call_user_func_array()

  • Hello, I am using the latest version of WordPress, and version 1.6.0 of Timber, and at the top of every page I am getting this warning…

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘wp_header’ not found or invalid function name in /home/bedsforkids/public_html/wp-content/plugins/timber-library/lib/Twig.php on line 311

    In Twig.php line 311 looks like this…

    return call_user_func_array($function_name, ($args));

    Please help me get rid of this error warning.

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hey @mjbiller

    I assume that somewhere in your Twig views, you have a call like the following:

    {{ wp_header() }}

    or maybe even

    {{ function('wp_header') }}

    That call should probably be replaced with

    {{ function('wp_head') }}

    If that doesn’t help, search for wp_header in your Twig views to find where it’s used and post that code section here so we can see what’s going on.

    Also, you might want to use

    define( 'WP_DEBUG', false );

    in your wp-config.php, so that the error doesn’t show up. Ideally, you’d have a second setup of the site to test updates and fix errors.

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: call_user_func_array()’ is closed to new replies.