Merge pull request #6377 from annando/ostatus-notice
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 4 Jan 2019 16:28:31 +0000 (11:28 -0500)
committerGitHub <noreply@github.com>
Fri, 4 Jan 2019 16:28:31 +0000 (11:28 -0500)
Prevent a notice ... again

src/Protocol/OStatus.php

index 1a6f748..1a6ce23 100644 (file)
@@ -1228,7 +1228,7 @@ class OStatus
        {
                $siteinfo = BBCode::getAttachedData($body);
 
-               if (($siteinfo["type"] == "photo")) {
+               if (($siteinfo["type"] == "photo") && (!empty($siteinfo["preview"]) || !empty($siteinfo["image"]))) {
                        if (isset($siteinfo["preview"])) {
                                $preview = $siteinfo["preview"];
                        } else {