Merge pull request #12436 from MrPetovan/bug/notices
Address a few notices
This commit is contained in:
commit
2ae3ae0b8a
|
@ -2599,7 +2599,7 @@ class BBCode
|
|||
// Bypass attachment if parse url for a comment
|
||||
if (!$tryAttachment) {
|
||||
DI::profiler()->stopRecording();
|
||||
return "\n" . '[url=' . $url . ']' . $siteinfo['title'] . '[/url]';
|
||||
return "\n" . '[url=' . $url . ']' . ($siteinfo['title'] ?? $url) . '[/url]';
|
||||
}
|
||||
|
||||
// Format it as BBCode attachment
|
||||
|
|
|
@ -142,7 +142,7 @@ class Subscribe extends \Friendica\BaseModule
|
|||
$o .= '<p>' . $counter . '/' . $total . ': ' . $url;
|
||||
|
||||
$probed = Contact::getByURL($url);
|
||||
if (in_array($probed['network'], Protocol::FEDERATED)) {
|
||||
if (!empty($probed['network']) && in_array($probed['network'], Protocol::FEDERATED)) {
|
||||
$result = Contact::createFromProbeForUser($this->session->getLocalUserId(), $probed['url']);
|
||||
if ($result['success']) {
|
||||
$o .= ' - ' . $this->t('success');
|
||||
|
|
|
@ -377,7 +377,7 @@ class Photo extends BaseModule
|
|||
$url = Contact::getDefaultAvatar($contact ?: [], Proxy::SIZE_SMALL);
|
||||
}
|
||||
}
|
||||
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext, $contact['blurhash'], $customsize, $customsize);
|
||||
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext, $contact['blurhash'] ?? null, $customsize, $customsize);
|
||||
case 'header':
|
||||
$fields = ['uid', 'url', 'header', 'network', 'gsid'];
|
||||
$contact = Contact::getById($id, $fields);
|
||||
|
|
Loading…
Reference in New Issue
Block a user