1
0
Fork 0

Merge pull request #12964 from MrPetovan/bug/warnings

Add receiver name extraction case
This commit is contained in:
Michael Vogel 2023-03-31 21:26:45 +02:00 committed by GitHub
commit 7d174c1944
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1278,8 +1278,10 @@ class Processor
$name = Receiver::PUBLIC_COLLECTION;
} elseif ($path = parse_url($receiver, PHP_URL_PATH)) {
$name = trim($path, '/');
} elseif ($host = parse_url($receiver, PHP_URL_HOST)) {
$name = $host;
} 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 = '';
}