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

WordPress Trac noreply at wordpress.org
Thu Jun 2 16:16:18 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 joyously):

 > Remove redundant `ltrim()` from `path_join()`

 Isn't it only redundant in the second return in `path_join`? It seems like
 the `ltrim` should be used in the first return. There is no test case for
 a path with multiple slashes.
 Also, the `path_is_absolute` function checks for `/` or `\`, so should
 these paths be normalized first, before joining them?

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

More information about the wp-trac mailing list