Some important fixes PHP 8.1

Some important fixes PHP 8.1
This commit is contained in:
novgorodschi catalin
2026-08-11 09:19:32 +03:00
parent ac262db66f
commit 8c5a5b94ea
13 changed files with 77 additions and 28 deletions
+2 -2
View File
@@ -162,7 +162,7 @@ if (count($rankArray) > 1) {
echo "<td class=\"pla\">";
$uid = (int)($row['userid'] ?? 0);
$username = htmlspecialchars($row['username'], ENT_QUOTES, 'UTF-8');
$username = htmlspecialchars((string) $row['username'], ENT_QUOTES, 'UTF-8');
if (!empty($row['access']) && $row['access'] > 2) {
echo "<u><a href=\"spieler.php?uid={$uid}\">{$username}</a></u>";
@@ -177,7 +177,7 @@ if (count($rankArray) > 1) {
if (!empty($row['aname']) && !empty($row['alliance'])) {
$aid = (int)$row['alliance'];
$aname = htmlspecialchars($row['aname'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars((string) $row['aname'], ENT_QUOTES, 'UTF-8');
echo "<a href=\"allianz.php?aid={$aid}\">{$aname}</a>";
} else {
echo "-";
+2 -2
View File
@@ -96,8 +96,8 @@ if ($totalRanks > 0) {
$uid = (int)$row['userid'];
$rank = (int)$i;
$username = htmlspecialchars($row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars($row['aname'], ENT_QUOTES, 'UTF-8');
$username = htmlspecialchars((string) $row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars((string) $row['aname'], ENT_QUOTES, 'UTF-8');
$highlight = ($i == $search) ? " class=\"hl\"" : "";
+2 -2
View File
@@ -95,8 +95,8 @@ if ($totalRanks > 0) {
$uid = (int)$row['userid'];
$rank = (int)$i;
$username = htmlspecialchars($row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars($row['aname'], ENT_QUOTES, 'UTF-8');
$username = htmlspecialchars((string) $row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars((string) $row['aname'], ENT_QUOTES, 'UTF-8');
$highlight = ($i == $search) ? " class=\"hl\"" : "";
+2 -2
View File
@@ -96,8 +96,8 @@ if ($totalRanks > 0) {
$uid = (int)$row['userid'];
$rank = (int)$i;
$username = htmlspecialchars($row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars($row['aname'], ENT_QUOTES, 'UTF-8');
$username = htmlspecialchars((string) $row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars((string) $row['aname'], ENT_QUOTES, 'UTF-8');
$highlight = ($i == $search) ? " class=\"hl\"" : "";
+2 -2
View File
@@ -96,8 +96,8 @@ if ($totalRanks > 0) {
$uid = (int)$row['userid'];
$rank = (int)$i;
$username = htmlspecialchars($row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars($row['aname'], ENT_QUOTES, 'UTF-8');
$username = htmlspecialchars((string) $row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars((string) $row['aname'], ENT_QUOTES, 'UTF-8');
$highlight = ($i == $search) ? " class=\"hl\"" : "";
+2 -2
View File
@@ -96,8 +96,8 @@ if ($totalRanks > 0) {
$uid = (int)$row['userid'];
$rank = (int)$i;
$username = htmlspecialchars($row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars($row['aname'], ENT_QUOTES, 'UTF-8');
$username = htmlspecialchars((string) $row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars((string) $row['aname'], ENT_QUOTES, 'UTF-8');
$highlight = ($i == $search) ? " class=\"hl\"" : "";
+2 -2
View File
@@ -96,8 +96,8 @@ if ($totalRanks > 0) {
$uid = (int)$row['userid'];
$rank = (int)$i;
$username = htmlspecialchars($row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars($row['aname'], ENT_QUOTES, 'UTF-8');
$username = htmlspecialchars((string) $row['username'], ENT_QUOTES, 'UTF-8');
$aname = htmlspecialchars((string) $row['aname'], ENT_QUOTES, 'UTF-8');
$highlight = ($i == $search) ? " class=\"hl\"" : "";