diff --git a/quiz/generic/returnfeed.php b/quiz/generic/returnfeed.php index a1ee3b6ba..100279b62 100644 --- a/quiz/generic/returnfeed.php +++ b/quiz/generic/returnfeed.php @@ -6,7 +6,7 @@ require_login(); $quiz_page_id = get_quiz_page_id_param($_REQUEST, 'quiz_page_id'); -$text = array_get($_POST, 'text_data', ''); +$text = $_POST['text_data'] ?? ''; include "./quiz_page.inc"; // qp_* diff --git a/quiz/start.php b/quiz/start.php index b137fcf80..c8790d69a 100644 --- a/quiz/start.php +++ b/quiz/start.php @@ -7,7 +7,7 @@ $username = $pguser; if (user_is_a_sitemanager() || user_is_proj_facilitator()) { - $username = array_get($_GET, 'username', $pguser); + $username = $_GET['username'] ?? $pguser; if (!User::is_valid_user($username)) { die("Invalid username."); } diff --git a/stats/members/mbr_list.php b/stats/members/mbr_list.php index daa3da6bc..2b611dab1 100644 --- a/stats/members/mbr_list.php +++ b/stats/members/mbr_list.php @@ -23,8 +23,8 @@ ['asc', 'desc'] ); $mstart = get_integer_param($_GET, 'mstart', 0, 0, null); -$uname = normalize_whitespace(array_get($_GET, 'uname', array_get($_GET, 'username', ''))); -$uexact = array_get($_GET, 'uexact', '') == 'yes'; +$uname = normalize_whitespace($_GET['uname'] ?? ($_GET['username'] ?? '')); +$uexact = ($_GET['uexact'] ?? '') == 'yes'; if ($uname) { if ($uexact) { diff --git a/stats/teams/new_team.php b/stats/teams/new_team.php index 70c4f652d..ecd29d896 100644 --- a/stats/teams/new_team.php +++ b/stats/teams/new_team.php @@ -12,11 +12,11 @@ $theme_extra_args = ["js_data" => get_newHelpWin_javascript("$code_url/pophelp.php?category=teams&name=edit_")]; -$teamname = trim(array_get($_POST, "teamname", "")); -$text_data = stripAllString(array_get($_POST, "text_data", "")); -$teamwebpage = array_get($_POST, "teamwebpage", ""); -$tavatar = array_get($_POST, "tavatar", ""); -$ticon = array_get($_POST, "ticon", ""); +$teamname = trim($_POST["teamname"] ?? ""); +$text_data = stripAllString($_POST["text_data"] ?? ""); +$teamwebpage = $_POST["teamwebpage"] ?? ""; +$tavatar = $_POST["tavatar"] ?? ""; +$ticon = $_POST["ticon"] ?? ""; if (isset($_POST['mkPreview'])) { diff --git a/stats/teams/tedit.php b/stats/teams/tedit.php index e779afb18..4c0870447 100644 --- a/stats/teams/tedit.php +++ b/stats/teams/tedit.php @@ -16,11 +16,11 @@ if (!isset($tid)) { $tid = get_integer_param($_GET, 'tid', null, 1, null); } -$teamname = stripAllString(trim(array_get($_POST, "teamname", ""))); -$text_data = stripAllString(array_get($_POST, "text_data", "")); -$teamwebpage = stripAllString(array_get($_POST, "teamwebpage", "")); -$tavatar = array_get($_POST, "tavatar", ""); -$ticon = array_get($_POST, "ticon", ""); +$teamname = stripAllString(trim($_POST["teamname"] ?? "")); +$text_data = stripAllString($_POST["text_data"] ?? ""); +$teamwebpage = stripAllString($_POST["teamwebpage"] ?? ""); +$tavatar = $_POST["tavatar"] ?? ""; +$ticon = $_POST["ticon"] ?? ""; $result = select_from_teams("id = $tid"); $curTeam = mysqli_fetch_assoc($result); diff --git a/stats/teams/tlist.php b/stats/teams/tlist.php index 82ea0faae..914c45c07 100644 --- a/stats/teams/tlist.php +++ b/stats/teams/tlist.php @@ -20,8 +20,8 @@ ['asc', 'desc'] ); $tstart = get_integer_param($_GET, 'tstart', 0, 0, null); -$tname = normalize_whitespace(array_get($_GET, 'tname', '')); -$texact = array_get($_GET, 'texact', '') == 'yes'; +$tname = normalize_whitespace($_GET['tname'] ?? ''); +$texact = ($_GET['texact'] ?? '') == 'yes'; if ($tname) { if ($texact) {