mirror of
https://github.com/friendica/friendica
synced 2025-04-28 12:24:23 +02:00
Address some PHP 8.1 deprecation notices
- Replace a strstr call by strpos in Model\APContact - Simplify conditions in Protocol\DFRN - Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1331012289
This commit is contained in:
parent
6c2f42ed03
commit
150c0e0750
3 changed files with 7 additions and 6 deletions
|
@ -305,8 +305,8 @@ class APContact
|
|||
|
||||
$apcontact['pubkey'] = null;
|
||||
if (!empty($compacted['w3id:publicKey'])) {
|
||||
$apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value'));
|
||||
if (strstr($apcontact['pubkey'], 'RSA ')) {
|
||||
$apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value') ?? '');
|
||||
if (strpos($apcontact['pubkey'], 'RSA ') !== false) {
|
||||
$apcontact['pubkey'] = Crypto::rsaToPem($apcontact['pubkey']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue