Connect with us

Fatal error Call to a member function do_all_hook() on array

solution

Fatal error Call to a member function do_all_hook() on array

Have you ever faced trouble with Fatal error: Call to a member function do_all_hook() on array on your WordPress website? This “Call to a member function do all_hook()” error is a common problem faced by many WordPress users. Fixing this error will create stress on your mind. Don’t worry about it. To get rid of this WordPress error, you have to read the complete article. Here we have given the simple methods to fix this Fatal error.

How to Fix “Fatal error: Call to member function do_all_hook() on array” Error

Fixing of “Fatal error: Call to a member function do all_hook() on array” error is not an easy task for the WordPress users. Regular WordPress users can fix it. But fixing “Fatal error: do_all_hook” is difficult for the WordPress Beginners. As a WordPress Beginner first you need to know why this “Fatal error: Call to a function do_all_hook() on array” arises and how to fix it. To get those details, you have to continue reading this article.

What is “Fatal error: do_all_hook() on array” Error?

The “Fatal error: Call to a member function do_all_hook() on array” error is one of the common error in WordPress. If the PHP does not have APC enabled then this Fatal error will arise.

Reasons for occurrence of Fatal error: Call to a member function do_all_hook() on array

The main reason for the occurrence of Fatal error: do_all_hook() is PHP-APC. In the wp-includes/object-cache.php, code checks that the APC is enabled or not in the the function ‘apc_fetch’. If the APC is not enabled then it sets $GLOBALS[‘_wp_using_ext_object_cache’] to false. Next, adds a filter to $wp_filter[‘all’]. Here we have shown that take a look on it.

1$GLOBALS['wp_filter']['all'][-100]['apc_not_actually_running'] = array( 'function' => 'apc_not_actually_running', 'accepted_args' => 0 );

When a filter add to $wp_filter[‘all’] then it become like this

1$wp_filter['all']->do_all_hook( $args );

When wp_call_all_hook() is called, it expects $wp_filter[‘all’] is one of the WP_Hook object. But the $wp_filter[‘all’] is an array due to the override happens in object-cache.php file the Fatal error: Call to a function do_all_hook() on array will arise.

How to Resolve “Fatal error: do_all_hook() on array”?

There are several ways to fix “Fatal error: Call to a member function do_all_hook() on array” on WordPress. Here we provided those all for you. Go through those solutions and resolve “Fatal error: do_all_hook()” error easily.

Method 1: Rename the object-cache.php file

Renaming the object-cache.php file is the best and easy way to resolve “Fatal error: Call to a member function do_all_hook() on array” on WordPress site. The process for renaming object-cache.php file is provided here. Have a look through the step by step process to rename object-cache.php file in the wp-content folder.

Related:  Resolve “Fatal error undefined function is_cart()” Error

using FTP

  • Access your WordPress site using FTP.
  • Now, click on the wp-content folder from your WordPress site root directory.
  • Search for the object-cache.php file.
  • Next, rename the object-cache.php file to object-cache-disable.php file.
  • Finally, Access your WordPress site. It can work properly without any Fatal Error.

using cPanel

  • Login to your cPanel Account.
  • Go to the wp-content folder from public.html.
  • Search for the object-cache.php file.
  • Next, rename the object-cache.php to object-cache-disable.php file.
  • Finally, Access your WordPress website. It can work without any Fatal error: Call to a member function do_all_hook() on array.

Method 2: install and enable APC on php

For fixing of WordPress error “Fatal error: Call to a member function do_all_hook() on array”, you can install and enable APC on php file. Follow the given step by step process for installing and enabling APC. Here we have chosen the WP Super Cache plugin for enabling cache on your WordPress site. By installing and activating the WP Super Cache plugin on your WordPress site, you can overcome this WordPress Fatal error.

Install WP Super Cache Plugin using WordPress Plugin Search

  • First, Login to your WordPress site admin area.
  • Click on Plugins option on your WordPress.
  • Click on the Add New option from the Plugin Page.
  • Enter WP Super Cache in the search Plugin field.
  • Now, the WP Super Cache plugin will appear on the screen.
  • Click on the Install Now Button on WP Super Cache plugin.
  • Now, the WP Super Cache Plugin is installed on your WordPress site.
  • Next, click on the Activate plugin option from the Installed WP Super Cache Plugin.
  • Finally, The WP Super Cache Plugin is installed on your site.

By installing this WP Super Cache Plugin, the cache is enabled on your WordPress site and the Fatal Error is resolved successfully. Now, your WordPress site can work properly without Fatal error: Call to a member function do_all_hook() on array.

Install WP Super Cache Plugin using the WordPress Admin Plugin Upload

  • Download WP Super Cache Plugin Zip File.
  • Login to your WordPress admin area.
  • Go to Plugin Page on your WordPress site.
  • Click on the Add New option from the Plugin Page.
  • Next, click on the upload plugin button available at the top of the plugin page.
  • Click on the Choose File button.
  • Select the downloaded WP Super Cache Plugin Zip File from your computer to upload.
  • Next, click on the Install Now option.
  • Now the WP Super Cache Plugin is installed on your WordPress site.
  • Next, click on the Activate option from the Installed WP Super Cache Plugin.
  • Finally, the WP Super Cache Plugin is installed on your site.
Related:  Adding Signature or Ads after Content in WordPress Post

The installed WP Super Cache WordPress Plugin will enable the cache on your WordPress website. Now, your WordPress site can work properly without Fatal error: Call to a member function do_all_hook() on array.

Manually Install WP Super Cache WordPress Plugin using FTP

  • First, download WP Super Cache Plugin Zip File.
  • Extract the Zip File.
  • Next, access your WordPress site using FTP.
  • Open the “wp-content/plugins/” folder.
  • Now, upload that Extracted Zip File of WP Super Cache to the “wp-content/plugins/” folder.
  • Next, Login to your WordPress site admin area.
  • Click on the Plugins option.
  • Next, activate the WP Super Cache WordPress Plugin.
  • Finally, the WP Super Cache Plugin is installed and activated on your site successfully.

By installing this WP Super Cache WordPress Plugin, the cache is enabled on your WordPress website and the Fatal error: Call to a member function do_all_hook() on array is resolved successfully. Now, your WordPress site can work properly without Fatal error.

Manually Install WP Super Cache WordPress Plugin using cPanel

  • First, download the WP Super Cache plugin zip file.
  • Login to your cPanel.
  • Next, click on the File Manager option.
  • Click on the public_html.
  • Click on the wp_contents folder.
  • A new web page will display on the screen.
  • Click on the plugins folder from that page.
  • The List of plugins installed on your WordPress is displayed here.
  • Next, click on the upload option from here.
  • Upload WP Super Cache plugin zip file.
  • Next, click on the uploaded file and select extract option.
  • A new window will appear on the screen.
  • Now, click on the Extract Files option from that window.
  • Click on reload option.
  • Next, go to your WordPress admin area.
  • Click on the Plugins option on your WordPress.
  • The list of installed plugins is available here.
  • Next, activate the WP Super Cache plugin.
  • Now, WP Super Cache Plugin is successfully installed and activated on your WordPress site.

The installed WP Super Cache Plugin will enable the cache on your WordPress site. Now, your site can work properly without Fatal error: do_all_hook() on array.

Conclusion:

Hope our article helped you to fix “Fatal error: Call to a member function do_all_hook() on array” Error on your WordPress website. Keep following us to get Best WordPress Theme Suggestion. If you got any WordPress errors then visit our site for getting simple solutions.

Continue Reading
You may also like...

We are a WordPress plugin developer company that focuses on useful WordPress plugin creation and empowering people to earn passive incomes from their blogs. We build unique and groundbreaking plugins that will revolutionize your blog!

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in solution

    Sign up for our newsletter and get a free affiliate e-book!


    About Me:

    Szabi Kisded

    Hi, my name is Szabi and I'm documenting my journey selling plugins on CodeCanyon. I will show you every step of it: learning to code, plugin ideas, WordPress stuff and more. Read more…

    Mega Plugin Bundle:

    CodeCanyon Portfolio:

    Learn to Code Plugins:

    Latest Promotions:

    Recommended Theme:

    Start Your Own Blog:

    Recommended VPN:

    Translate Your Blog:

    AdSense Alternative:

    Best Article Spinner:

    Popular Posts:

    Latest Posts:

    To Top