Merge pull request #7273 from MrPetovan/bug/notices

Fix various notices 2019.06
This commit is contained in:
Philipp 2019-06-16 00:58:22 +02:00 committed by GitHub
commit dc95d7c4f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -1463,12 +1463,14 @@ class Contact extends BaseObject
return $contact_id;
}
$updated = ['addr' => $data['addr'],
$updated = [
'addr' => $data['addr'] ?? '',
'alias' => defaults($data, 'alias', ''),
'url' => $data['url'],
'nurl' => Strings::normaliseLink($data['url']),
'name' => $data['name'],
'nick' => $data['nick']];
'nick' => $data['nick']
];
if (!empty($data['keywords'])) {
$updated['keywords'] = $data['keywords'];
@ -1502,7 +1504,7 @@ class Contact extends BaseObject
$updated['pubkey'] = $data['pubkey'];
}
if (($data['addr'] != $contact['addr']) || (!empty($data['alias']) && ($data['alias'] != $contact['alias']))) {
if (($updated['addr'] != $contact['addr']) || (!empty($data['alias']) && ($data['alias'] != $contact['alias']))) {
$updated['uri-date'] = DateTimeFormat::utcNow();
}
if (($data["name"] != $contact["name"]) || ($data["nick"] != $contact["nick"])) {

View File

@ -88,7 +88,7 @@ class Federation extends BaseAdminModule
} while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));
// only take the x.x.x part of the version, not the "release" after the dash
if (!empty($part) && strpos($part, '-')) {
$part = array_shift(explode('-', $part));
$part = explode('-', $part)[0];
}
if (!empty($part)) {
if (empty($compacted[$part])) {

View File

@ -3543,7 +3543,7 @@ class Diaspora
$public = ($item["private"] ? "false" : "true");
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
$edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM);
$edited = DateTimeFormat::utc($item["edited"] ?? $item["created"], DateTimeFormat::ATOM);
// Detect a share element and do a reshare
if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {