Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ $passwd_result = exec('/usr/bin/passwd --status root');
$boolWebUIAuth = $isRegistered && (($passwd_result !== false) && (substr($passwd_result, 0, 6) == 'root P'));

// Helper to determine the current value for the remote access input
$dynamicRemoteAccessType = $myServersFlashCfg['remote']['dynamicRemoteAccessType'];
$upnpEnabled = $myServersFlashCfg['remote']['upnpEnabled'] === 'yes';
$wanaccessEnabled = $myServersFlashCfg['remote']['wanaccess'] === 'yes';
$dynamicRemoteAccessType = $myServersFlashCfg['remote']['dynamicRemoteAccessType'] ?? null;
$upnpEnabled = ($myServersFlashCfg['remote']['upnpEnabled'] ?? null) === 'yes';
$wanaccessEnabled = ($myServersFlashCfg['remote']['wanaccess'] ?? null) === 'yes';

$currentRemoteAccessValue = 'OFF';
if ($dynamicRemoteAccessType === 'STATIC') {
Expand Down Expand Up @@ -68,7 +68,7 @@ div.shade-gray{background-color:#121510;margin-top:10px;padding:8px 0 3px 0}
</style>
<script>
const hasMyUnraidNetCert = <?=($hasMyUnraidNetCert ? 'true' : 'false')?>;
const wanAccessOrg = "<?=$myServersFlashCfg['remote']['wanaccess']?>";
const wanAccessOrg = "<?=$myServersFlashCfg['remote']['wanaccess'] ?? null?>";

function registerServer(button) {

Expand Down Expand Up @@ -196,7 +196,7 @@ function dnsCheckServer(button) {
} else {
swal({
title: "Oops",
text: "<?=sprintf(_("The Unraid server is unreachable from outside your network. Be sure you have configured your router to forward port") . " <strong style='font-weight: bold'>%u/TCP</strong> " . _("to the Unraid server at") . " <strong style='font-weight: bold'>%s</strong> " . _("port") . " <strong style='font-weight: bold'>%u</strong>", $myServersFlashCfg['remote']['wanport'], htmlspecialchars($eth0['IPADDR:0']??''), $var['PORTSSL']??443)?>",
text: "<?=sprintf(_("The Unraid server is unreachable from outside your network. Be sure you have configured your router to forward port") . " <strong style='font-weight: bold'>%u/TCP</strong> " . _("to the Unraid server at") . " <strong style='font-weight: bold'>%s</strong> " . _("port") . " <strong style='font-weight: bold'>%u</strong>", $myServersFlashCfg['remote']['wanport']??"", htmlspecialchars($eth0['IPADDR:0']??''), $var['PORTSSL']??443)?>",
type: "error",
html: true,
confirmButtonText: "_(Ok)_"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function getIgnoredReleases()
* Note: CURLINFO_HEADER_OUT exposes request headers (not response headers) for curl_getinfo
* @return string|false $out The fetched content
*/
private function safe_http_get_contents(string $url, array $opts = [], array &$getinfo = NULL) {
private function safe_http_get_contents(string $url, array $opts = [], ?array &$getinfo = NULL) {
// Use system http_get_contents if it exists
if (function_exists('http_get_contents')) {
return http_get_contents($url, $opts, $getinfo);
Expand Down
Loading