]> git.mxchange.org Git - friendica.git/blobdiff - include/plaintext.php
Bugfix for pull request #2147 (Fix for issue #2122)
[friendica.git] / include / plaintext.php
index 4f435fc6a29339a55453eae7ea24cec03641dac3..204feb137f00bf05dba1731977069d6ffc9aa781 100644 (file)
@@ -55,9 +55,10 @@ function get_attached_data($body) {
                                $data = parseurl_getsiteinfo_cached($pictures[0][1], true);
                                if ($data["type"] == "photo") {
                                        $post["type"] = "photo";
-                                       if (isset($data["images"][0]))
+                                       if (isset($data["images"][0])) {
                                                $post["image"] = $data["images"][0]["src"];
-                                       else
+                                               $post["url"] = $data["url"];
+                                       } else
                                                $post["image"] = $data["url"];
 
                                        $post["preview"] = $pictures[0][2];