]> git.mxchange.org Git - friendica.git/commitdiff
Fix notice "Undefined index: network" and warning "strpos(): Empty needle"
authorMichael <heluecht@pirati.ca>
Thu, 29 Oct 2020 13:28:27 +0000 (13:28 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 29 Oct 2020 13:28:27 +0000 (13:28 +0000)
src/Content/PageInfo.php
src/Module/Contact.php

index 39bd35f73af68511db77c60a441c2005305247ce..786385c3ef7d4a841efb372650e31ce07cf91fb3 100644 (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 '';
                        }
 
index 17b598a98bd994874c66736715b1534963da2e2c..08256bcf566093dda03f3b6535b6706352c225f7 100644 (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' : ''),