[wp-trac] [WordPress Trac] #58121: WP_Filesystem_SSH2::put_contents() assumes that PHP's file_put_contents() always returns in int

WordPress Trac noreply at wordpress.org
Wed Apr 12 19:33:56 UTC 2023


#58121: WP_Filesystem_SSH2::put_contents() assumes that PHP's file_put_contents()
always returns in int
----------------------------+----------------------
 Reporter:  pbiron          |       Owner:  (none)
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Filesystem API  |     Version:
 Severity:  normal          |  Resolution:  wontfix
 Keywords:                  |     Focuses:
----------------------------+----------------------
Changes (by pbiron):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Just looked into how PHP's `strlen()` is implemented.

 It's O(1) (there's a `len` property associated with every string and
 that's what's returned), so I guess there's not a big performance hit for
 a needless call to `strlen()`.

 So, I'll close this as `wontfix`.

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


More information about the wp-trac mailing list