mirror of
https://github.com/unraid/webgui.git
synced 2026-05-03 08:19:27 -05:00
fix a few php8 warnings
This commit is contained in:
@@ -97,13 +97,13 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
|
||||
//support
|
||||
$support = plugin('support',$plugin_file) ?: "";
|
||||
$support = $support ? "<a href='$support' target='_blank'>"._('Support Thread')."</a>" : "";
|
||||
//category
|
||||
$category = plugin('category',$plugin_file) ?: (strpos($version,'-')!==false ? 'next' : 'stable');
|
||||
//author
|
||||
$author = plugin('author',$plugin_file) ?: _('anonymous');
|
||||
//version
|
||||
$version = plugin('version',$plugin_file) ?: _('unknown');
|
||||
$date = str_replace('.','',$version);
|
||||
//category
|
||||
$category = plugin('category',$plugin_file) ?: (strpos($version,'-')!==false ? 'next' : 'stable');
|
||||
//status
|
||||
$status = $check ? _('unknown') : _('checking').'...';
|
||||
$id = str_replace('.','-',$name);
|
||||
|
||||
@@ -119,7 +119,7 @@ function translate($key) {
|
||||
|
||||
// main
|
||||
$language = [];
|
||||
$locale = $_SESSION['locale'] ?? $login_locale;
|
||||
$locale = $_SESSION['locale'] ?? ($login_locale??'');
|
||||
$return = "function _(t){return t;}";
|
||||
$jscript = "$docroot/webGui/javascript/translate.en_US.js";
|
||||
$root = "$docroot/languages/en_US/helptext.txt";
|
||||
|
||||
@@ -27,7 +27,9 @@ ini_set("session.use_strict_mode", "1");
|
||||
// Safari bug prevents use of 'Strict'
|
||||
// ini_set("session.cookie_samesite", $secure?'Strict':'Lax');
|
||||
ini_set("session.cookie_samesite", 'Lax');
|
||||
session_name("unraid_".md5(strstr($_SERVER['HTTP_HOST'].':', ':', true)));
|
||||
if (array_key_exists('HTTP_HOST', $_SERVER)) {
|
||||
session_name("unraid_".md5(strstr($_SERVER['HTTP_HOST'].':', ':', true)));
|
||||
}
|
||||
session_set_cookie_params(0, '/', null, $secure, true);
|
||||
if ($_SERVER['SCRIPT_NAME'] != '/login.php' && $_SERVER['SCRIPT_NAME'] != '/auth-request.php' && isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if (!isset($var)) $var = parse_ini_file('state/var.ini');
|
||||
|
||||
Reference in New Issue
Block a user