From 403dca154c6b539de221f9e16174a0fdd0a1e896 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Feb 2021 23:41:32 +0300 Subject: initial WIP for php8; bump php version requirement to 7.0 --- classes/pref/prefs.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'classes/pref/prefs.php') diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 55a15efb8..a77c1abaa 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -321,7 +321,7 @@ class Pref_Prefs extends Handler_Protected { print ""; print ""; - if (!SINGLE_USER_MODE && !$_SESSION["hide_hello"]) { + if (!SINGLE_USER_MODE && !empty($_SESSION["hide_hello"])) { $access_level = $row["access_level"]; print "
"; @@ -595,7 +595,7 @@ class Pref_Prefs extends Handler_Protected { print '
'; - $profile = $_SESSION["profile"]; + $profile = $_SESSION["profile"] ?? null; if ($profile) { print_notice(__("Some preferences are only available in default profile.")); @@ -916,7 +916,7 @@ class Pref_Prefs extends Handler_Protected { foreach ($tmppluginhost->get_plugins() as $name => $plugin) { $about = $plugin->about(); - if ($about[3]) { + if ($about[3] ?? false) { if (in_array($name, $system_enabled)) { $checked = "checked='1'"; } else { @@ -930,7 +930,7 @@ class Pref_Prefs extends Handler_Protected { dojoType='dijit.form.CheckBox' $checked type='checkbox'> ".htmlspecialchars($about[1]). ""; - if (@$about[4]) { + if ($about[4] ?? false) { print ""; @@ -950,7 +950,7 @@ class Pref_Prefs extends Handler_Protected { foreach ($tmppluginhost->get_plugins() as $name => $plugin) { $about = $plugin->about(); - if (!$about[3]) { + if ($about[3] ?? false) { $checked = ""; $disabled = ""; @@ -976,7 +976,7 @@ class Pref_Prefs extends Handler_Protected { } } - if (@$about[4]) { + if ($about[4] ?? false) { print " "; -- cgit v1.2.3-54-g00ecf