]> git.mxchange.org Git - friendica-addons.git/commitdiff
Fixing some notices
authorMichael <heluecht@pirati.ca>
Sat, 4 Apr 2020 11:15:13 +0000 (11:15 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 4 Apr 2020 11:15:13 +0000 (11:15 +0000)
pumpio/pumpio.php
statusnet/library/statusnetoauth.php
twitter/twitter.php

index b196167a626bb9411880b0482ca05ec61955a769..e371fd8ef67ab6b85ae4846cc5fc97118a074732 100644 (file)
@@ -672,7 +672,7 @@ function pumpio_action(App $a, $uid, $uri, $action, $content = "")
        if ($success) {
                Logger::log('pumpio_action '.$username.' '.$action.': success '.$uri);
        } else {
-               Logger::log('pumpio_action '.$username.' '.$action.': general error: '.$uri.' '.print_r($user, true));
+               Logger::log('pumpio_action '.$username.' '.$action.': general error: '.$uri);
                Worker::defer();
        }
 }
index fa44eb9b32baef7d71e3bd2eb2894e1b35b67aeb..c9bb01636caf3360b08756ce545a557c27392d2e 100644 (file)
@@ -15,6 +15,9 @@ class StatusNetOAuth extends TwitterOAuth
        function get_maxlength()
        {
                $config = $this->get($this->host . 'statusnet/config.json');
+               if (empty($config)) {
+                       return 0;
+               }
                return $config->site->textlimit;
        }
 
index da8c3b3691dd86f0ee8171281ac69edb6eb56944..56f11fbf40e9fd8b9dc46167829070710536c98b 100644 (file)
@@ -1978,6 +1978,10 @@ function twitter_update_mentions($body)
 
 function twitter_convert_share(array $attributes, array $author_contact, $content, $is_quote_share)
 {
+       if (empty($contact)) {
+               return $content . "\n\n" . $attributes['link'];
+       }
+
        if ($author_contact['network'] == Protocol::TWITTER) {
                $mention = '@' . $author_contact['nick'];
        } else {