And again removed notices
authorMichael <heluecht@pirati.ca>
Thu, 9 Aug 2018 04:16:56 +0000 (04:16 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 9 Aug 2018 04:16:56 +0000 (04:16 +0000)
statusnet/statusnet.php

index 92dadc4..f7574c5 100644 (file)
@@ -342,7 +342,9 @@ function statusnet_settings(App $a, &$s)
                         */
                        $connection = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret);
                        $details = $connection->get('account/verify_credentials');
-                       $s .= '<div id="statusnet-info" ><img id="statusnet-avatar" src="' . $details->profile_image_url . '" /><p id="statusnet-info-block">' . L10n::t('Currently connected to: ') . '<a href="' . $details->statusnet_profile_url . '" target="_statusnet">' . $details->screen_name . '</a><br /><em>' . $details->description . '</em></p></div>';
+                       if (!empty($details)) {
+                               $s .= '<div id="statusnet-info" ><img id="statusnet-avatar" src="' . $details->profile_image_url . '" /><p id="statusnet-info-block">' . L10n::t('Currently connected to: ') . '<a href="' . $details->statusnet_profile_url . '" target="_statusnet">' . $details->screen_name . '</a><br /><em>' . $details->description . '</em></p></div>';
+                       }
                        $s .= '<p>' . L10n::t('If enabled all your <strong>public</strong> postings can be posted to the associated GNU Social account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') . '</p>';
                        if ($a->user['hidewall']) {
                                $s .= '<p>' . L10n::t('<strong>Note</strong>: Due your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to GNU Social will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '</p>';