diff options
author | Mario <mario@mariovavti.com> | 2021-03-10 13:16:08 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-10 13:16:08 +0000 |
commit | f8447521a84c0eb30c08da212e8156256558617b (patch) | |
tree | 62a8e527517a19ed18928aaeff3314d680f94b9f /Zotlabs/Module/Network.php | |
parent | 15faf01ec960fff88a1f9c83fb6d251319cecea7 (diff) | |
download | volse-hubzilla-f8447521a84c0eb30c08da212e8156256558617b.tar.gz volse-hubzilla-f8447521a84c0eb30c08da212e8156256558617b.tar.bz2 volse-hubzilla-f8447521a84c0eb30c08da212e8156256558617b.zip |
php8: random fixes deriving from mod network
Diffstat (limited to 'Zotlabs/Module/Network.php')
-rw-r--r-- | Zotlabs/Module/Network.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 8a1b51a18..4f9450f2f 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -20,8 +20,10 @@ class Network extends \Zotlabs\Web\Controller { return; } - if(in_array(substr($_GET['search'],0,1),[ '@', '!', '?']) || strpos($_GET['search'], 'https://') === 0) - goaway(z_root() . '/search?f=&search=' . $_GET['search']); + $search = $_GET['search'] ?? ''; + + if(in_array(substr($search, 0, 1),[ '@', '!', '?']) || strpos($search, 'https://') === 0) + goaway(z_root() . '/search?f=&search=' . $search); if(count($_GET) < 2) { $network_options = get_pconfig(local_channel(),'system','network_page_default'); @@ -80,7 +82,7 @@ class Network extends \Zotlabs\Web\Controller { break; } - $search = (($_GET['search']) ? $_GET['search'] : ''); + $search = $_GET['search'] ?? ''; if($search) { if(strpos($search,'#') === 0) { $hashtags = substr($search,1); |