• Resolved wordpressguy19

    (@wordpressguy19)


    I got such a mistake when trying to update. What can I do?

    Fatal error:

    Fatal error: Uncaught Error: Call to undefined method WP_Error::has_errors() in
    public_html/wp-admin/includes/file.php:1504 Stack trace: #0
    public_html/wp-admin/includes/class-wp-upgrader.php(192): WP_Filesystem(true, ‘/home/klient.dh…’, false) #1
    public_html/wp-admin/includes/translation-install.php(263): WP_Upgrader->fs_connect(Array) #2
    public_html/wp-admin/options-general.php(180): wp_can_install_language_pack() #3 {main} thrown in public_html/wp-admin/includes/file.php on line 1504

Viewing 5 replies - 1 through 5 (of 5 total)
  • What version of WordPress did you have before? and what version were you updating to?
    Did you have a plugin like WP Downgrade installed?
    Is this a live site or a local installation?

    Thread Starter wordpressguy19

    (@wordpressguy19)

    I have 5.0.3 ver and the update is 5.1.
    I have elementor, ocean extra, really simple ssl, yoast seo

    clorith:

    That’s a classic “update didn’t complete properly, do a manual upgrade” scenario

    pbiron:

    the beginning of the update process runs with the old version installed. at one point during the update, the files from the new version get installed and the update continues from that point. (edited)
    looks like that error happened when attempting to update translates
    since /wp-admin/includes/files.php was updated in 5.1 (among other things, adding the call to WP_Error::has_errors()) and /wp-includes/class-wp-error.php was also updated in 5.1 (to add the has_errors() method, as @clorith suggested, something must have happened that caused /wp-includes/class-wp-errors.php to not be updated as it should have been. What that something was I coun’t venture a guess.

    Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and delete then replace your copies of everything except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    Thread Starter wordpressguy19

    (@wordpressguy19)

    It works! thank you

    i am right that i must backup my wp-config and my wp-content folder ?

    then i must extract the actual WordPress version to my webspace and replace the files

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error’ is closed to new replies.