• Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ” was given in /home1/larryb44/public_html/wp-includes/class-wp-hook.php on line 298 ……appears on front page of http://www.ussfranklindroosevelt.com PLEASE HELP!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have the same problem on two of my blogs. I see that this message has not been replied in three months. Is this plug-in still supported or not?

    Since Updating to 4.7 I have the same problem. It would be great to know if this plug-in is still supported or not?

    This PHP warning might be related to a change in WordPress core 4.7.x related to new class ‘wp-includes/class-wp-hook.php’. As it’s a warning, you would not normally see it in the browser, unless you’d enabled WP_DEBUG or told PHP to display errors.

    Here’s a possible fix, it’s experimental only, but it’s only one line, so quite easy to revert.

    make a backup, then edit collapsPage.php, change this line near the top (look out for word wrap, this code is only two lines)

    //add_action('wp_head', wp_enqueue_script('jquery'));
    add_action('wp_enqueue_scripts', function(){wp_enqueue_script('jquery');});

    reload the page to test. On my system, the warning went away after this change, and the JavaScript is still able to expand and collapse.

    • This reply was modified 6 years, 6 months ago by gerryhickman.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning: call_user_func_array() [function.call-user-func-array]: First argument’ is closed to new replies.