• Resolved Sean Conklin

    (@seanconklin)


    I use WP Engine for hosting. This is from a WP Cron event during UpdraftPlus software updates. I have the latest versions of everything. I’ve seen this error several times now, around once per week. It looks to be a core unzip function that UpdraftPlus utilizes. I’ve only seen this error from the UpdraftPlus plugin updates but I am on the lookout for anymore plugins causing it as well. I only have 9 active plugins so it can take a bit 🙂

    Here’s the log:

    2022-03-03T16:53:23+00:00 CRITICAL Uncaught Error: Call to undefined function disk_free_space() in /nas/content/live/codedcommerce/wp-admin/includes/file.php:1666
    Stack trace:
    #0 /nas/content/live/codedcommerce/wp-admin/includes/file.php(1586): _unzip_file_ziparchive(‘/tmp/updraftplu…’, ‘/nas/content/li…’, Array)
    #1 /nas/content/live/codedcommerce/wp-admin/includes/class-wp-upgrader.php(329): unzip_file(‘/tmp/updraftplu…’, ‘/nas/content/li…’)
    #2 /nas/content/live/codedcommerce/wp-admin/includes/class-wp-upgrader.php(780): WP_Upgrader->unpack_package(‘/tmp/updraftplu…’, true)
    #3 /nas/content/live/codedcommerce/wp-admin/includes/class-plugin-upgrader.php(231): WP_Upgrader->run(Array)
    #4 /nas/content/live/codedcommerce/wp-admin/includes/class-wp-automatic-updater.php(403): Plugin_Upgrader->upgrade(‘updraftplus/upd…’, Array)
    #5 /nas/content/live/codedcommerce/wp-admin/includes/class-wp-automatic-updater.php(469): WP_Automatic_Updater->update(‘plugin’, Object(stdClass))
    #6 /nas/content/live/codedcommerce/wp-includes/update.php(729): WP_Automatic_Updater->run()
    #7 /nas/content/live/codedcommerce/wp-includes/class-wp-hook.php(307): wp_maybe_auto_update(”)
    #8 /nas/content/live/codedcommerce/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
    #9 /nas/content/live/codedcommerce/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #10 /nas/content/live/codedcommerce/wp-includes/update.php(256): do_action(‘wp_maybe_auto_u…’)
    #11 /nas/content/live/codedcommerce/wp-includes/class-wp-hook.php(307): wp_version_check()
    #12 /nas/content/live/codedcommerce/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
    #13 /nas/content/live/codedcommerce/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #14 /nas/content/live/codedcommerce/wp-cron.php(138): do_action_ref_array(‘wp_version_chec…’, Array)
    #15 {main}
    thrown in /nas/content/live/codedcommerce/wp-admin/includes/file.php on line 1666

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Anderson

    (@davidanderson)

    
    Uncaught Error: Call to undefined function disk_free_space() in /nas/content/live/codedcommerce/wp-admin/includes/file.php
    

    Hi Sean,

    When WP core updates a plugin (which means it downloads it and unzips it) it does a disk free space check. It runs that check in a way that will ignore errors. In PHP 8.0 that way no longer works if there are errors, and it crashes. Your web hosting company has removed the PHP function, causing the error/crash. You will need to ask them why, since it breaks WordPress’s core updates code. If they refuse to re-enable it, you won’t be able to use WordPress on PHP 8.0 with your current host. You will see the same error if you enable auto-updates on other plugins, since it is in the main part of WP’s auto-updates code path.

    David

    Thread Starter Sean Conklin

    (@seanconklin)

    Thanks, yeah I suspected that might be the case.

    I chatted with WP Engine today and they are hopefully looking into it. They suggested it may also affect PHP 7.4 and my PHP 8.0 upgrade might have been coincidental.

    They pointed me to this article on system settings which cannot be changed at the customer level https://wpengine.com/support/platform-settings/#Server_Modules

    I figure I can always make the function myself to spoof WordPress, or I can switch over to their Smart Plugin Manager service instead. However, I feel that a core WordPress function isn’t something that a host can just decide to break.

    Marking as resolved concerning UpdraftPlus.

    Plugin Author David Anderson

    (@davidanderson)

    > They suggested it may also affect PHP 7.4 and my PHP 8.0 upgrade might have been coincidental.

    It’s not coincidental – in PHP 8.0, the silenced error on that code line is handled as a fatal error; see https://www.php.net/manual/en/migration80.incompatible.php – (“The @ operator will no longer silence fatal errors”).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP 8.0 fatal error found in logs from WP upgrade cron’ is closed to new replies.