]> git.mxchange.org Git - friendica.git/commitdiff
Check image property is set in Object\Image
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 9 Jan 2023 15:29:56 +0000 (10:29 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 9 Jan 2023 21:06:22 +0000 (16:06 -0500)
- Property was either an object or null, strict comparison with "false" was inaccurate
- Address https://github.com/friendica/friendica/issues/12486#issuecomment-1374888800

src/Object/Image.php

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