Issue 8735: Ensure the correct data type for "hide"
This commit is contained in:
parent
3eb3fe8e98
commit
bc4e5b4d69
2 changed files with 7 additions and 7 deletions
|
@ -92,7 +92,11 @@ class Probe
|
|||
$newdata = [];
|
||||
foreach ($fields as $field) {
|
||||
if (isset($data[$field])) {
|
||||
$newdata[$field] = $data[$field];
|
||||
if (in_array($field, ["gsid", "hide", "account-type"])) {
|
||||
$newdata[$field] = (int)$data[$field];
|
||||
} else {
|
||||
$newdata[$field] = $data[$field];
|
||||
}
|
||||
} elseif ($field != "gsid") {
|
||||
$newdata[$field] = "";
|
||||
} else {
|
||||
|
@ -398,7 +402,7 @@ class Probe
|
|||
// When the previous detection process had got a time out
|
||||
// we could falsely detect a Friendica profile as AP profile.
|
||||
if (!self::$istimeout) {
|
||||
$ap_profile = ActivityPub::probeProfile($uri);
|
||||
$ap_profile = ActivityPub::probeProfile($uri, !$cache);
|
||||
|
||||
if (empty($data) || (!empty($ap_profile) && empty($network) && (($data['network'] ?? '') != Protocol::DFRN))) {
|
||||
$data = $ap_profile;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue