• Resolved Refringe

    (@plixer)


    I run this SSH SFTP Updater Support plugin on a number of sites and all of them have been put into recovery mode after the last update with the following information.

    WordPress version 5.3.2
    Current plugin: SSH SFTP Updater Support (version 0.8.2)
    PHP version 7.4.2

    Error Details
    =============
    An error of type E_ERROR was caused in line 253 of the file /public/wp-content/plugins/ssh-sftp-updater-support/class-wp-filesystem-ssh2.php. Error message: Uncaught Error: Call to a member function stat() on bool in /public/wp-content/plugins/ssh-sftp-updater-support/class-wp-filesystem-ssh2.php:253
    Stack trace:
    #0 /public/wp-content/plugins/wp-rocket/wp-rocket.php(87): WP_Filesystem_SSH2->exists(‘/public/…’)
    #1 /public/wp-settings.php(360): include_once(‘/public/…’)
    #2 /wp-config.php(120): require_once(‘/public/…’)
    #3 /public/wp-load.php(42): require_once(‘/public/…’)
    #4 /public/wp-admin/admin.php(34): require_once(‘/public/…’)
    #5 /public/wp-admin/update-core.php(10): require_once(‘/public/…’)
    #6 {main}
    thrown

    Can you please help?

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

    (@davidanderson)

    Hi,

    This indicates that the plugin WP Rocket is using the WP_Filesystem API incorrectly, making calls without checking their results, which eventually cascades into a fatal error. You should report it to them.

    David

    Thread Starter Refringe

    (@plixer)

    Will do. Thank you, David!

    I don’t agree, the problem is in this plugin which doesn’t implement the exists method properly or its lack of error handling.

    Error states the problem is here, probably the link property wasn’t set.

    Plugin Author David Anderson

    (@davidanderson)

    No; according to the WP Filesystem API, the exists() method can only return a “yes” or “no” answer (boolean true/false). There is no provision for additional error handling inside that method. So what you say is impossible. Hence my earlier answer. The plugin calling has to check that the link is up before asking whether a file exists or not. If it does not include that check then there is no other possible response than throwing an error when the link is not up, because in that situation either of “yes” or “no” is guesswork with unpredictable consequences and hence a bad idea.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Recovery Mode: Error – Call to a member function stat() on bool’ is closed to new replies.