Merge pull request #12436 from MrPetovan/bug/notices
Address a few notices
This commit is contained in:
commit
2ae3ae0b8a
3 changed files with 3 additions and 3 deletions
|
@ -2599,7 +2599,7 @@ class BBCode
|
||||||
// Bypass attachment if parse url for a comment
|
// Bypass attachment if parse url for a comment
|
||||||
if (!$tryAttachment) {
|
if (!$tryAttachment) {
|
||||||
DI::profiler()->stopRecording();
|
DI::profiler()->stopRecording();
|
||||||
return "\n" . '[url=' . $url . ']' . $siteinfo['title'] . '[/url]';
|
return "\n" . '[url=' . $url . ']' . ($siteinfo['title'] ?? $url) . '[/url]';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format it as BBCode attachment
|
// Format it as BBCode attachment
|
||||||
|
|
|
@ -142,7 +142,7 @@ class Subscribe extends \Friendica\BaseModule
|
||||||
$o .= '<p>' . $counter . '/' . $total . ': ' . $url;
|
$o .= '<p>' . $counter . '/' . $total . ': ' . $url;
|
||||||
|
|
||||||
$probed = Contact::getByURL($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']);
|
$result = Contact::createFromProbeForUser($this->session->getLocalUserId(), $probed['url']);
|
||||||
if ($result['success']) {
|
if ($result['success']) {
|
||||||
$o .= ' - ' . $this->t('success');
|
$o .= ' - ' . $this->t('success');
|
||||||
|
|
|
@ -377,7 +377,7 @@ class Photo extends BaseModule
|
||||||
$url = Contact::getDefaultAvatar($contact ?: [], Proxy::SIZE_SMALL);
|
$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':
|
case 'header':
|
||||||
$fields = ['uid', 'url', 'header', 'network', 'gsid'];
|
$fields = ['uid', 'url', 'header', 'network', 'gsid'];
|
||||||
$contact = Contact::getById($id, $fields);
|
$contact = Contact::getById($id, $fields);
|
||||||
|
|
Loading…
Reference in a new issue