[wp-trac] [WordPress Trac] #55897: Add tests for path_join()

WordPress Trac noreply at wordpress.org
Thu Jun 2 15:29:41 UTC 2022

#55897: Add tests for path_join()
 Reporter:  karlijnbk                            |       Owner:  karlijnbk
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1
Component:  General                              |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback                                       |

Comment (by SergeyBiryukov):

 In [changeset:"53460" 53460]:
 #!CommitTicketReference repository="" revision="53460"
 General: Remove redundant `ltrim()` from `path_join()`.

 If the path starts with a slash, it will be considered absolute and
 returned as is earlier in the function.

 It it's not absolute, then it does not start with a slash, so there is
 nothing to trim.

 This change is covered by existing unit tests.

 Follow-up to [6984], [53457].

 Props karlijnbk.
 See #55897.

Ticket URL: <https://core.trac.wordpress.org/ticket/55897#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list