Check image property is set in Object\Image

- Property was either an object or null, strict comparison with "false" was inaccurate
- Address https://github.com/friendica/friendica/issues/12486#issuecomment-1374888800
This commit is contained in:
Hypolite Petovan 2023-01-09 10:29:56 -05:00
parent b77f3a7525
commit 14e4c0db8e

View file

@ -196,7 +196,7 @@ class Image
public function isValid(): bool public function isValid(): bool
{ {
if ($this->isImagick()) { if ($this->isImagick()) {
return ($this->image !== false); return !empty($this->image);
} }
return $this->valid; return $this->valid;
} }