Prevent a fatal error when the returned extension value is false. Previous version was only handling string values, but wp_check_filetype() can return false.
Fixes #872
Type of change
[x] Bug fix (non-breaking change which fixes an issue).
Checklists
Feature validation
[ ] I validated all the Acceptance Criteria. If possible, provide sreenshots or videos.
[ ] I triggered all changed lines of code at least once without new errors/warnings/notices.
[ ] I implemented built-in tests to cover the new/changed code.
Code style
[x] I wrote self-explanatory code about what it does.
[x] I named variables and functions explicitely.
[x] I protected entry points against unexpected inputs.
Description
Prevent a fatal error when the returned extension value is false. Previous version was only handling string values, but
wp_check_filetype()
can returnfalse
.Fixes #872
Type of change
Checklists
Feature validation
Code style