Avoiding some notices
This commit is contained in:
parent
0760b41fac
commit
c1dec50248
|
@ -579,6 +579,9 @@ class Contact extends BaseObject
|
||||||
*/
|
*/
|
||||||
public static function terminateFriendship(array $user, array $contact, $dissolve = false)
|
public static function terminateFriendship(array $user, array $contact, $dissolve = false)
|
||||||
{
|
{
|
||||||
|
if (empty($contact['network'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (($contact['network'] == Protocol::DFRN) && $dissolve) {
|
if (($contact['network'] == Protocol::DFRN) && $dissolve) {
|
||||||
DFRN::deliver($user, $contact, 'placeholder', true);
|
DFRN::deliver($user, $contact, 'placeholder', true);
|
||||||
} elseif (in_array($contact['network'], [Protocol::OSTATUS, Protocol::DFRN])) {
|
} elseif (in_array($contact['network'], [Protocol::OSTATUS, Protocol::DFRN])) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Login extends BaseModule
|
||||||
|
|
||||||
public static function post()
|
public static function post()
|
||||||
{
|
{
|
||||||
$return_path = $_SESSION['return_path'];
|
$return_path = defaults($_SESSION, 'return_path', '');
|
||||||
session_unset();
|
session_unset();
|
||||||
$_SESSION['return_path'] = $return_path;
|
$_SESSION['return_path'] = $return_path;
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ class JsonLD
|
||||||
|
|
||||||
// Workaround for Nextcloud Social
|
// Workaround for Nextcloud Social
|
||||||
// See issue https://github.com/nextcloud/social/issues/330
|
// 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';
|
$json['@context'][] = 'https://w3id.org/security/v1';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue