]> git.mxchange.org Git - friendica-addons.git/commitdiff
Some more notices in addons
authorMichael <heluecht@pirati.ca>
Wed, 1 Aug 2018 17:28:55 +0000 (17:28 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 1 Aug 2018 17:28:55 +0000 (17:28 +0000)
fromgplus/fromgplus.php
pumpio/pumpio.php
tumblr/tumblr.php

index 959ad1f7f1a80bf1332e9884258ba6faabfa9fc5..ac433526a020b033b68188c5471225f6b4058a4d 100644 (file)
@@ -341,10 +341,13 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
                                if ($images["full"] != "")
                                        $pagedata["images"][0]["src"] = $images["full"];
 
-                               $quote = trim(fromgplus_html2bbcode($attachment->content));
+                               if (!empty($attachment->content)) {
+                                       $quote = trim(fromgplus_html2bbcode($attachment->content));
+                               }
 
-                               if ($quote != "")
+                               if (!empty($quote)) {
                                        $pagedata["text"] = $quote;
+                               }
 
                                // Add Keywords to page link
                                $data = parseurl_getsiteinfo_cached($pagedata["url"], true);
index 4431cf4ccb606068de1ccb43045ddaae5f70a10b..501c844607514ff093a0f86d630e02721ef71931 100644 (file)
@@ -778,6 +778,7 @@ function pumpio_fetchtimeline(App $a, $uid)
                $success = $client->CallAPI($url, 'GET', [], ['FailOnAccessError'=>true], $user);
        } else {
                $success = false;
+               $user = [];
        }
 
        if (!$success) {
index 86a90737f9ae20995c243f5782cea48a5d2b5b7f..dc3d9db1c5dca4086a3524f123b9eb1482654b7f 100644 (file)
@@ -443,7 +443,7 @@ function tumblr_send(App $a, array &$b) {
                                                "<p>".$params['caption']."</p>";
                }
 
-               if (empty($params['caption'])) {
+               if (empty($params['caption']) && !empty($siteinfo["description"])) {
                        $params['caption'] = BBCode::convert("[quote]" . $siteinfo["description"] . "[/quote]", false, 4);
                }