[wp-trac] [WordPress Trac] #58541: WP_Filesystem_SSH2:put_contents (and others) does not check for $sftp_link to be up

WordPress Trac noreply at wordpress.org
Mon Jun 19 04:54:34 UTC 2023


#58541: WP_Filesystem_SSH2:put_contents (and others) does not check for $sftp_link
to be up
-----------------------------------------+------------------------------
 Reporter:  jobst                        |       Owner:  (none)
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Filesystem API               |     Version:
 Severity:  major                        |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:
-----------------------------------------+------------------------------

Comment (by costdev):

 Hi @jobst, thanks for getting back to me on this!

 I can call `WP_Filesystem()` without any parameters and with the correct
 constants set in `wp-config.php`, `WP_Filesystem()` connects just fine and
 `$wp_filesystem->put_contents()` works.

 In case you didn't see this in my last comment:

 > After calling `WP_Filesystem()`, can you try dumping
 `$wp_filesystem->errors->get_error_messages()` and see what errors are
 occurring?

 If you can then post the value that's dumped into a comment here, that
 would be great!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58541#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list