[Media] Fix undefined variable box in imagefile.php
This commit is contained in:
parent
ed7a88ce66
commit
7044f0e2cf
@ -578,13 +578,16 @@ class ImageFile extends MediaFile
|
|||||||
$filename = MediaFile::decodeFilename(basename($this->filepath));
|
$filename = MediaFile::decodeFilename(basename($this->filepath));
|
||||||
// Encoding null makes the file use 'untitled', and also replaces the extension
|
// Encoding null makes the file use 'untitled', and also replaces the extension
|
||||||
$outfilename = MediaFile::encodeFilename($filename, $this->filehash, $ext);
|
$outfilename = MediaFile::encodeFilename($filename, $this->filehash, $ext);
|
||||||
$outpath = File_thumbnail::path(
|
|
||||||
"thumb-{$this->fileRecord->id}-{$box['width']}x{$box['height']}-{$outfilename}");
|
|
||||||
|
|
||||||
// The boundary box for our resizing
|
// The boundary box for our resizing
|
||||||
$box = array('width'=>$width, 'height'=>$height,
|
$box = [
|
||||||
'x'=>$x, 'y'=>$y,
|
'width'=>$width, 'height'=>$height,
|
||||||
'w'=>$w, 'h'=>$h);
|
'x'=>$x, 'y'=>$y,
|
||||||
|
'w'=>$w, 'h'=>$h
|
||||||
|
];
|
||||||
|
|
||||||
|
$outpath = File_thumbnail::path(
|
||||||
|
"thumb-{$this->fileRecord->id}-{$box['width']}x{$box['height']}-{$outfilename}");
|
||||||
|
|
||||||
// Doublecheck that parameters are sane and integers.
|
// Doublecheck that parameters are sane and integers.
|
||||||
if ($box['width'] < 1 || $box['width'] > common_config('thumbnail', 'maxsize')
|
if ($box['width'] < 1 || $box['width'] > common_config('thumbnail', 'maxsize')
|
||||||
|
Loading…
Reference in New Issue
Block a user