Add support for string in $nodeinfo['protocols']
- Address https://github.com/friendica/friendica/issues/13157#issuecomment-1848404671
This commit is contained in:
parent
dc9658f532
commit
35e3e912df
|
@ -1266,9 +1266,13 @@ class GServer
|
|||
|
||||
if (!empty($nodeinfo['protocols'])) {
|
||||
$protocols = [];
|
||||
foreach ($nodeinfo['protocols'] as $protocol) {
|
||||
if (is_string($protocol)) {
|
||||
$protocols[$protocol] = true;
|
||||
if (is_string($nodeinfo['protocols'])) {
|
||||
$protocols[$nodeinfo['protocols']] = true;
|
||||
} else {
|
||||
foreach ($nodeinfo['protocols'] as $protocol) {
|
||||
if (is_string($protocol)) {
|
||||
$protocols[$protocol] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1367,9 +1371,13 @@ class GServer
|
|||
|
||||
if (!empty($nodeinfo['protocols'])) {
|
||||
$protocols = [];
|
||||
foreach ($nodeinfo['protocols'] as $protocol) {
|
||||
if (is_string($protocol)) {
|
||||
$protocols[$protocol] = true;
|
||||
if (is_string($nodeinfo['protocols'])) {
|
||||
$protocols[$nodeinfo['protocols']] = true;
|
||||
} else {
|
||||
foreach ($nodeinfo['protocols'] as $protocol) {
|
||||
if (is_string($protocol)) {
|
||||
$protocols[$protocol] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user