mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-29 23:22:34 +01:00
Wraps file extension comparison components in strtolower()
This avoids the issue where replacing file.PNG with newfile.png fails due to "PNG" not being equal to "png"
This commit is contained in:
parent
14837e34fb
commit
9b0ef85f77
@ -166,7 +166,7 @@ class ImageRepo
|
||||
*/
|
||||
public function updateImageFile(Image $image, UploadedFile $file): void
|
||||
{
|
||||
if ($file->getClientOriginalExtension() !== pathinfo($image->path, PATHINFO_EXTENSION)) {
|
||||
if (strtolower($file->getClientOriginalExtension()) !== strtolower(pathinfo($image->path, PATHINFO_EXTENSION))) {
|
||||
throw new ImageUploadException(trans('errors.image_upload_replace_type'));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user