Fix various PHP 8 deprecations

This commit is contained in:
Hypolite Petovan 2022-11-19 19:10:02 -05:00
parent a147038c2e
commit 6f93ee7e49
10 changed files with 19 additions and 23 deletions

View file

@ -383,7 +383,7 @@ class APContact
// kroeg:blocks, updated
// When the photo is too large, try to shorten it by removing parts
if (strlen($apcontact['photo']) > 255) {
if (strlen($apcontact['photo'] ?? '') > 255) {
$parts = parse_url($apcontact['photo']);
unset($parts['fragment']);
$apcontact['photo'] = (string)Uri::fromParts($parts);
@ -574,7 +574,7 @@ class APContact
*
* @param array $apcontact
*
* @return bool
* @return bool
*/
public static function isRelay(array $apcontact): bool
{