From 225243645ef06ca8e7fff6bd21e75718a2ce9729 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Apr 2020 11:15:13 +0000 Subject: [PATCH] Fixing some notices --- pumpio/pumpio.php | 2 +- statusnet/library/statusnetoauth.php | 3 +++ twitter/twitter.php | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index b196167a..e371fd8e 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -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(); } } diff --git a/statusnet/library/statusnetoauth.php b/statusnet/library/statusnetoauth.php index fa44eb9b..c9bb0163 100644 --- a/statusnet/library/statusnetoauth.php +++ b/statusnet/library/statusnetoauth.php @@ -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; } diff --git a/twitter/twitter.php b/twitter/twitter.php index da8c3b36..56f11fbf 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -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 { -- 2.39.5