basename, dirname, and pathinfo are locale aware, meaning that they will only handle characters that match up with the PHP default locale (ASCII). For example, Using Non-ASCII Unicode filenames for Media files would cause Grav to ignore them, since it used basename for checks (Fixed in #2083). There is a similar issue here with the use of pathinfo (See php.net for more info):
basename
,dirname
, andpathinfo
are locale aware, meaning that they will only handle characters that match up with the PHP default locale (ASCII). For example, Using Non-ASCII Unicode filenames for Media files would cause Grav to ignore them, since it usedbasename
for checks (Fixed in #2083). There is a similar issue here with the use ofpathinfo
(See php.net for more info):https://github.com/getgrav/grav/blob/cad10b6095bc86fa7610712283f3e88a33dbd2bc/system/src/Grav/Common/Page/Medium/MediumFactory.php#L29
One solution is to make a set of locale safe helper functions. I have made a set of helper functions that can be used as an example here.