mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:00:16 +00:00
Fix "TypeError: Argument 1 passed to Friendica\Util\Strings::compareLink() must be of the type string, null given"
This commit is contained in:
parent
99aec68582
commit
fd508fa423
1 changed files with 5 additions and 1 deletions
|
@ -3557,6 +3557,10 @@ class Contact
|
|||
*/
|
||||
public static function magicLinkById(int $cid, string $url = ''): string
|
||||
{
|
||||
if (($url == '') && DI::userSession()->isAuthenticated() && DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'stay_local')) {
|
||||
return 'contact/' . $cid . '/conversations';
|
||||
}
|
||||
|
||||
$contact = DBA::selectFirst('contact', ['id', 'network', 'url', 'alias', 'uid'], ['id' => $cid]);
|
||||
|
||||
return self::magicLinkByContact($contact, $url);
|
||||
|
@ -3584,7 +3588,7 @@ class Contact
|
|||
return 'contact/' . $contact['id'] . '/conversations';
|
||||
}
|
||||
|
||||
if (Strings::compareLink($contact['url'], $url) || Strings::compareLink($contact['alias'], $url)) {
|
||||
if (Strings::compareLink($contact['url'], $url) || Strings::compareLink($contact['alias'] ?? '', $url)) {
|
||||
$url = '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue