From 03aeb888322e792ccb17593761f1f93ad2906c7e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 20 Oct 2022 10:25:11 +0000 Subject: fix php warnings --- Zotlabs/Module/Help.php | 2 ++ Zotlabs/Module/Search.php | 2 +- include/help.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Help.php b/Zotlabs/Module/Help.php index bfe1d4e12..55ac80842 100644 --- a/Zotlabs/Module/Help.php +++ b/Zotlabs/Module/Help.php @@ -17,6 +17,8 @@ class Help extends \Zotlabs\Web\Controller { function get() { nav_set_selected('Help'); + $o = ''; + if(isset($_REQUEST['search']) && $_REQUEST['search']) { $o .= '
'; $o .= '
'; diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php index da4752186..c88bc4534 100644 --- a/Zotlabs/Module/Search.php +++ b/Zotlabs/Module/Search.php @@ -33,7 +33,7 @@ class Search extends Controller { require_once('include/security.php'); - $format = (($_REQUEST['format']) ? $_REQUEST['format'] : ''); + $format = $_REQUEST['format'] ?? ''; if ($format !== '') { $update = $load = 1; } diff --git a/include/help.php b/include/help.php index 6daf81b8e..8a913578a 100644 --- a/include/help.php +++ b/include/help.php @@ -248,7 +248,7 @@ function search_doc_files($s) { $r[$x]['text'] = substr($r[$x]['body'], $start, $dislen); $r[$x]['rank'] = 0; - if($r[$x]['term']) { + if(isset($r[$x]['term'])) { foreach($r[$x]['term'] as $t) { if(stristr($t['term'],$s)) { $r[$x]['rank'] ++; -- cgit v1.2.3