File::getIsImage()
always returns false
, even if the file is an image.
#594
Labels
File::getIsImage()
always returns false
, even if the file is an image.
#594
Module version(s) affected
4.*
,5.*
Description
If you create a new file, and the file is an image, and you call
$file->getIsImage()
, it returnsfalse
if you created it using theFile
class.How to reproduce
Execute the below code, where
$someFileLocation
is the path to a file on your filesystem.Regardless of what type of file that is, whether it's an image or not,
false
will be dumped out.Possible Solution
Check
$this->appCategory()
, e.g:That won't capture images that developers put in custom app categories - but I think that's an edge case we can live with.
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)The text was updated successfully, but these errors were encountered: