dav icon indicating copy to clipboard operation
dav copied to clipboard

Purge "basename" from everything

Open Man-Grove opened this issue 3 years ago • 1 comments

basename() is not multibyte-safe and seems to have been removed from almost everywhere, but it still lingers in \sabre\dav\bin\migrateto30.php and is lurking in a comment in \sabre\dav\lib\DAV\Browser\Plugin.php

Also, it is used in the docs, for example in https://sabre.io/dav/virtual-filesystems/ which in this case bit me -- I had no idea basename was even a native PHP function, and its undefined utf8 behavior if not prepended with set_locale, and so it dropped the first mb char of every file name if present, which was unexpected. Easily fixed with Uri\split but that should be used everywhere for clarity I think.

Man-Grove avatar Aug 11 '21 09:08 Man-Grove

Feel free to provide a PR which suggests an alternative

staabm avatar Aug 11 '21 09:08 staabm