Support » Fixing WordPress » How to fix error: Warning: call_user_func_array()…

  • Resolved carolaklass


    I get the following warning on my website:
    : call_user_func_array() []: First argument is expected to be a valid callback, ‘wp_admin_bar_sidebar_toggle’ was given in /home/content/63/10399363/html/ on line 601

    I’d like to comment out the function, but am not sure which part of the code to comment out. I tried commenting out this entire chunk, but it didn’t fix the error:

    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 );

    Any advice is appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p


    what did you do before you got this error?

    Tara–sadly, what I did prior to this error is lost in the fog of time. I’ve neglected this site for a year or so, and when I returned to it, this error occurred.

    I should add-the fixes for this error are posted several times on this forum. Of the suggested fixes, I’d like to comment this chunk out. But, I’m commenting it out at the wrong parts of the chunk, so it’s not working. Do you know how I can successfully comment out the chunk I posted in my original question?

    Moderator t-p


    Have you tried:
    – Flushing any caching plugins you might be running, as well as server and/or browser caches. Also, any op cache or content network cache, as well as Cloudflare, clear those caches.
    – deactivating ALL (yes all) plugins temporarily to see if this resolves the problem (plugin functions can interfere). If this works, re-activate them individually (one-by-one) to find the problematic plugin(s).
    – If you can’t get into your admin dashboard, try resetting the plugins folder by FTP. Sometimes, an apparently inactive plugin can still cause problems. Also remember to deactivate any plugins in the mu-plugins folder (if you have created such folder). The easiest way is to rename that folder to mu-plugins-old.
    – switching to the unedited default Theme (Twenty Sixteen, etc.) for a moment using the WP dashboard to rule out any theme-specific issue (theme functions can interfere like plugins). If you don’t have access to your admin area, use FTP , or your web-host’s cPanel or whatever file management application your host provides (no Dashboard access required). Navigate to /wp-content/themes/ and switch to the default theme by renaming your current theme’s folder by adding “-old” to the end of the folder name. Alternately, you can remove other themes except the default theme. That will force your site to use it.
    – If all the above steps do not resolve the issue, then try MANUALLY updating. Download a fresh copy of the WordPress .zip file to your computer, unzip it, and use that to copy up all files and folders EXCEPT the wp-config.php file and the /wp-content/ directory. You may need to delete the old wp-admin and wp-includes folders and files on your server before uploading the new ones. Read the Manual Update directions first.
    Backup: If you haven’t already done, always backup everything (including your database) before doing any actions, just in case something really goes wrong.

    Thanks, Tara. I did the manual update of folders / files, and that’s what finally fixed the warning. I appreciate your detailed help!

    Moderator t-p


    You are welcome 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to fix error: Warning: call_user_func_array()…’ is closed to new replies.