Title: Fatal error: Call to undefined method WP_Error::has_errors()&#8230;
Last modified: March 14, 2019

---

# Fatal error: Call to undefined method WP_Error::has_errors()…

 *  Resolved [Matthew Fries](https://wordpress.org/support/users/brewermfnyc/)
 * (@brewermfnyc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/)
 * I just tried to upgrade from 4.9.8 to 5.1.1 and have encountered a bunch of errors.
   Here is what has happened and what I’ve tried:
 * 1. Upgrade process looked like it completed, but it still showed that 4.9.8 was
   the current version of WP.
 * 2. I clicked upgrade again and encountered the error:
 * `Fatal error: Call to undefined method WP_Error::has_errors() in .../wp-admin/
   includes/file.php on line 1504`
 * Dashboard “at a glance” still says I’m running version 4.9.8.
 * 3. Also note – The front end seems to be working fine, but when I try to edit
   a post or page I get the following errors:
 *     ```
       Warning: array_reduce() expects parameter 2 to be a valid callback, function 'rest_preload_api_request' not found or invalid function name in .../wp-admin/edit-form-blocks.php on line 76
   
       Fatal error: Class 'WP_Block_Type_Registry' not found in .../wp-admin/includes/post.php on line 2196
       ```
   
 * 4. I connected to the site with FTP and deleted all WP core files. I uploaded
   a fresh version of WP 5.1.1 that I just grabbed off of the site here. Complete
   manual reinstall/upgrade.
 * 5. WP Admin dashboard still shows I’m currently running version 4.9.8 and all
   the errors I mentioned above are persisting. If I look in …/wp-includes/version.
   php it says:
 *     ```
       /**
        * The WordPress version string
        *
        * @global string $wp_version
        */
       $wp_version = '5.1.1';
       ```
   
 * Wondering how I’m this out of sync. FWIW I’m unable to disable any plugins because
   I get the same error:
 * `Fatal error: Call to undefined method WP_Error::has_errors() in .../wp-admin/
   includes/file.php on line 1504`
 * _NOTE: I replaced the sensitive part of the file locations with “…” in the errors
   above._
    -  This topic was modified 7 years, 2 months ago by [Matthew Fries](https://wordpress.org/support/users/brewermfnyc/).

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [Matthew Fries](https://wordpress.org/support/users/brewermfnyc/)
 * (@brewermfnyc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11311156)
 * Looks like now I’m getting the error on the login page as well. I’m unable to
   get to my dashboard at all now.
 * `Fatal error: Call to undefined method WP_Error::has_errors() in .../wp-admin/
   includes/file.php on line 1504`
 *  Thread Starter [Matthew Fries](https://wordpress.org/support/users/brewermfnyc/)
 * (@brewermfnyc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11313257)
 * I also confirmed with the server folks that there is no caching going on on the
   server.
 *  [npiper](https://wordpress.org/support/users/npiper/)
 * (@npiper)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11314364)
 * I am getting the same error message when trying to update wordpress to version
   5.1.1. Fatal error: Call to undefined method WP_Error::has_errors() in C:\inetpub\
   wwwroot\wordpress\wp-admin\includes\file.php on line 1504
 *  [mikebrylinski](https://wordpress.org/support/users/mikebrylinski/)
 * (@mikebrylinski)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11318890)
 * I am also catching the same error on a 4.9 site.
    I get the same “Fatal error”
   when I try to edit a page’s content, or install a plugin.
    -  This reply was modified 7 years, 2 months ago by [mikebrylinski](https://wordpress.org/support/users/mikebrylinski/).
 *  Thread Starter [Matthew Fries](https://wordpress.org/support/users/brewermfnyc/)
 * (@brewermfnyc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11324056)
 * Strangely the next morning everything was working correctly – like a cache had
   finally caught up, though my host swears there’s no caching going on. Since then
   I’m having the same problems with failed plugin updates. The last Yoast update
   took my whole site offline and I had to manually remove the plugin and haven’t
   been able to reinstall it through WordPress or manually. It’s like it halfway
   loads into WP and breaks.
 *  Thread Starter [Matthew Fries](https://wordpress.org/support/users/brewermfnyc/)
 * (@brewermfnyc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11328423)
 * So – finally some answers from my web host. It turned out to be a problem with
   PHP on our server. Our website is using PHP-FPM and the changes we were making
   were not being picked up because the PHP-FPM processes needed to be restarted.
 * Back in business for now…
    -  This reply was modified 7 years, 2 months ago by [Matthew Fries](https://wordpress.org/support/users/brewermfnyc/).
 *  [ericjanofski](https://wordpress.org/support/users/ericjanofski/)
 * (@ericjanofski)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11367273)
 * Had the same problem. I restarted the php-fpm service in WHM and the error resolved.
   thanks so much!
 *  [k8peterson](https://wordpress.org/support/users/k8peterson/)
 * (@k8peterson)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11431654)
 * This worked for me. Updated from php 5.4 to 7.2 in the MultiPHP Manager in cpanel
   and viola. Thank you!
 *  [ronsoftsolutionslimited](https://wordpress.org/support/users/ronsoftsolutionslimited/)
 * (@ronsoftsolutionslimited)
 * [7 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11510593)
 * Same Issue with me… I just tried to upgrade from 4.9.8 to 5.1.1 and have encountered
   a bunch of errors. Here is what has happened and what I’ve tried:
 * 1. Upgrade process looked like it completed, but it still showed that 4.9.8 was
   the current version of WP.
 * 2. I clicked upgrade again and encountered the error:
    Fatal error: Uncaught 
   Error: Call to undefined method WP_Error::has_errors() in /home/hello/public_html/
   wp-login.php:58 Stack trace: #0 /home/hello/public_html/wp-login.php(1045): login_header(‘
   Log In’, ”, Object(WP_Error)) #1 {main} thrown in /home/hello/public_html/wp-
   login.php on line 58
 * How do we fix this issue?.
    Changed PHP to 7.2, Replaced Core Files, Nothing 
   changes…
 *  [ronsoftsolutionslimited](https://wordpress.org/support/users/ronsoftsolutionslimited/)
 * (@ronsoftsolutionslimited)
 * [7 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11510599)
 * My front end seems to be working fine, but when I try login with /wp-admin, i
   get the below error;
 * /home/hello/public_html/wp-login.php:58 Stack trace: #0 /home/hello/public_html/
   wp-login.php(1045): login_header(‘Log In’, ”, Object(WP_Error)) #1 {main} thrown
   in /home/hello/public_html/wp-login.php on line 58

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Fatal error: Call to undefined method WP_Error::has_errors()…’ is closed
to new replies.

## Tags

 * [installation](https://wordpress.org/support/topic-tag/installation/)
 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 6 participants
 * Last reply from: [ronsoftsolutionslimited](https://wordpress.org/support/users/ronsoftsolutionslimited/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-wp_errorhas_errors/#post-11510599)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
