This helper method was introduced in I3d8c6f6. I found this bug while working on I0a5be39. The method was cutting off strings like "/subpage" into "ubpage". I made sure no existing test case changed, as you can see. I also tried to document the basic idea: The first character can never be a subpage divider, even if it is a slash, because this would result in an empty base. The code tries to skip initial slashes and use the first non-empty substring as the base. However, if there is nothing but slashes, the worst-case fallback is to use the first slash as if it is the base. I think there are still 2 different ways to split the following edge-cases: * "//foo" could become: a) base "/" + divider + subpage "foo", or b) base "//foo" with NO subpage. * "//" could become: a) base "/" + divider + empty subpage, or b) base "//" with NO subpage. Personally, I would pick b). But there was a test case already that forced me to stick to a). Bug: T229443 Change-Id: I4914b57c81ce6c7fdf10746f0da902c65f0ac2c9 |
||
|---|---|---|
| .. | ||
| api-testing | ||
| common | ||
| integration/includes | ||
| parser | ||
| phan | ||
| phpunit | ||
| qunit | ||
| selenium | ||
| .htaccess | ||