Merge pull request #9468 from annando/notices

Fix notice "Undefined index: network" and warning "strpos(): Empty needle"
This commit is contained in:
Hypolite Petovan 2020-10-29 11:44:40 -04:00 committed by GitHub
commit 0ab4723367
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -292,7 +292,7 @@ class PageInfo
$quotedUrl
)$#isx", function ($match) use ($url) {
// Stripping URLs with no label
if (!isset($match[1])) {
if (empty($match[1])) {
return '';
}

View file

@ -937,7 +937,7 @@ class Contact extends BaseModule
],
];
if (in_array($contact['network'], [Protocol::FEED, Protocol::MAIL]) && ($cid != $pcid)) {
if (!empty($contact['network']) && in_array($contact['network'], [Protocol::FEED, Protocol::MAIL]) && ($cid != $pcid)) {
$tabs[] = ['label' => DI::l10n()->t('Advanced'),
'url' => 'contact/' . $cid . '/advanced/',
'sel' => (($active_tab == self::TAB_ADVANCED) ? 'active' : ''),