mirror of
https://github.com/friendica/friendica
synced 2025-01-09 22:44:44 +00:00
Merge pull request #12964 from MrPetovan/bug/warnings
Add receiver name extraction case
This commit is contained in:
commit
7d174c1944
1 changed files with 3 additions and 1 deletions
|
@ -1278,8 +1278,10 @@ class Processor
|
||||||
$name = Receiver::PUBLIC_COLLECTION;
|
$name = Receiver::PUBLIC_COLLECTION;
|
||||||
} elseif ($path = parse_url($receiver, PHP_URL_PATH)) {
|
} elseif ($path = parse_url($receiver, PHP_URL_PATH)) {
|
||||||
$name = trim($path, '/');
|
$name = trim($path, '/');
|
||||||
|
} elseif ($host = parse_url($receiver, PHP_URL_HOST)) {
|
||||||
|
$name = $host;
|
||||||
} else {
|
} else {
|
||||||
Logger::warning('Unable to coerce name from receiver', ['receiver' => $receiver]);
|
Logger::warning('Unable to coerce name from receiver', ['element' => $element, 'type' => $type, 'receiver' => $receiver]);
|
||||||
$name = '';
|
$name = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue