*/
public static function terminateFriendship(array $user, array $contact, $dissolve = false)
{
+ if (empty($contact['network'])) {
+ return;
+ }
if (($contact['network'] == Protocol::DFRN) && $dissolve) {
DFRN::deliver($user, $contact, 'placeholder', true);
} elseif (in_array($contact['network'], [Protocol::OSTATUS, Protocol::DFRN])) {
public static function post()
{
- $return_path = $_SESSION['return_path'];
+ $return_path = defaults($_SESSION, 'return_path', '');
session_unset();
$_SESSION['return_path'] = $return_path;
-
+
// OpenId Login
if (
empty($_POST['password'])
// Workaround for Nextcloud Social
// See issue https://github.com/nextcloud/social/issues/330
- if (is_array($json['@context'])) {
+ if (!empty($json['@context']) && is_array($json['@context'])) {
$json['@context'][] = 'https://w3id.org/security/v1';
}