mirror of
https://github.com/unraid/webgui.git
synced 2026-02-22 18:29:47 -06:00
Fix PHP8 errors
This commit is contained in:
@@ -357,7 +357,7 @@ function plugin($method, $plugin_file, &$error) {
|
||||
if (isset($file->attributes()->Method)) {
|
||||
if (!in_array($method, explode(" ", $file->attributes()->Method))) continue;
|
||||
} elseif ($method != 'install') continue;
|
||||
$name = $file->attributes()->Name;
|
||||
$name = $file->attributes()->Name ?: '';
|
||||
// bergware - check Unraid version dependency (if present)
|
||||
$min = $file->attributes()->Min;
|
||||
if ($min && version_compare($unraid['version'],$min,'<')) {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#!/usr/bin/php
|
||||
<?PHP
|
||||
function SysDriverslog($m, $type = "NOTICE") {
|
||||
if ($type == "DEBUG") return NULL;
|
||||
$m = print_r($m,true);
|
||||
$m = str_replace("\n", " ", $m);
|
||||
$m = str_replace('"', "'", $m);
|
||||
exec("logger -t webGUI -- \"$m\"");
|
||||
function SysDriverslog($m, $type='NOTICE') {
|
||||
if ($type == 'DEBUG') return;
|
||||
$m = str_replace(["\n",'"'],[" ","'"],print_r($m,true));
|
||||
exec("logger -t sysDrivers -- \"$m\"");
|
||||
}
|
||||
|
||||
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
|
||||
@@ -16,13 +14,12 @@ require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php"
|
||||
// add translations
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
$kernel = shell_exec("uname -r");
|
||||
$kernel = trim($kernel,"\n");
|
||||
$lsmod = shell_exec("lsmod");
|
||||
$supportpage = true;
|
||||
$kernel = trim(shell_exec("uname -r"));
|
||||
$lsmod = shell_exec("lsmod");
|
||||
$supportpage = true;
|
||||
$modtoplgfile = "/tmp/modulestoplg.json";
|
||||
$sysdrvfile = "/tmp/sysdrivers.json";
|
||||
$arrModtoPlg = json_decode(file_get_contents("/tmp/modulestoplg.json") ,TRUE);
|
||||
$sysdrvfile = "/tmp/sysdrivers.json";
|
||||
$arrModtoPlg = file_exists($modtoplgfile) ? json_decode(file_get_contents($modtoplgfile), true) : '';
|
||||
file_put_contents("/tmp/sysdrivers.init","1");
|
||||
|
||||
SysDriverslog("SysDrivers Build Starting");
|
||||
|
||||
Reference in New Issue
Block a user