\Psl\Filesystem\get_extension()
can return empty string
#349
Labels
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
Describe the bug
\Psl\Filesystem\get_extension()
can return empty stringTo Reproduce
Expected behavior
null
to be returned.Additional context
Not sure how this should be fixed.
One aproach to fix this would be to change the return from
non-empty-string|null
tostring|null
.Personally I would expect
null
to be returned for a file without an extension but with a.
in the name (like in the example above).I can make a PR once the direction is decided.
The text was updated successfully, but these errors were encountered: