Merge pull request #10228 from MrPetovan/bug/warnings

[PHP 8] Fix undefined template variables
This commit is contained in:
Tobias Diekershoff 2021-05-11 06:10:29 +02:00 committed by GitHub
commit 7789ea2507
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 215 additions and 292 deletions

View file

@ -3020,7 +3020,7 @@ class Item
];
if (!empty($item['plink'])) {
$ret["href"] = DI::baseUrl()->remove($item['plink']);
$ret['href'] = DI::baseUrl()->remove($item['plink']);
$ret["title"] = DI::l10n()->t('link to source');
}
} elseif (!empty($item['plink']) && ($item['private'] != self::PRIVATE)) {
@ -3028,6 +3028,7 @@ class Item
'href' => $item['plink'],
'orig' => $item['plink'],
'title' => DI::l10n()->t('link to source'),
'orig_title' => DI::l10n()->t('Link to source'),
];
} else {
$ret = [];

View file

@ -412,7 +412,12 @@ class Profile
}
}
$p = [];
// Expected profile/vcard.tpl profile.* template variables
$p = [
'address' => null,
'edit' => null,
'upubkey' => null,
];
foreach ($profile as $k => $v) {
$k = str_replace('-', '_', $k);
$p[$k] = $v;