Fatal error: Call to undefined method WP_Error::has_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.
- The topic ‘Fatal error: Call to undefined method WP_Error::has_errors()…’ is closed to new replies.