mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
Check that getimagesize was initialised
This commit is contained in:
parent
9b0ca686ed
commit
5c89f664e5
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,10 @@ class Resizer
|
|||
|
||||
private function constructDimension($max)
|
||||
{
|
||||
if ($this->getimagesize[0] > $max || $this->getimagesize[1] > $max) {
|
||||
if (!isset($this->getimagesize)) {
|
||||
return false;
|
||||
}
|
||||
if (is_array($this->getimagesize) && ($this->getimagesize[0] > $max || $this->getimagesize[1] > $max)) {
|
||||
return photo_calculate_scale(array_merge($this->getimagesize, ['max' => $max]));
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue