fix compatibility for php < 8

This commit is contained in:
Beu 2023-05-25 13:35:18 +02:00
parent 32e00a8051
commit 9edb5de5c6
1 changed files with 2 additions and 2 deletions

View File

@ -294,7 +294,7 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList
foreach ($serverOptionsArray as $name => $value) { foreach ($serverOptionsArray as $name => $value) {
// Continue on CurrentMaxPlayers... // Continue on CurrentMaxPlayers...
if (str_contains($name, 'Current')) continue; // TODO: display 'Current...' somewhere if (strpos($name, 'Current') !== false) continue; // TODO: display 'Current...' somewhere
if ($index % 13 === 0) { if ($index % 13 === 0) {
$pageFrame = new Frame(); $pageFrame = new Frame();
@ -328,7 +328,7 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList
$optionsFrame->setY($posY - $optionHeight * 1.5); $optionsFrame->setY($posY - $optionHeight * 1.5);
$posY -= $optionHeight * 3.; $posY -= $optionHeight * 3.;
$index += 3; $index += 3;
} else if (str_contains($name, 'Password')) { } else if (strpos($name, 'Password') !== false) {
$entry->setTextFormat("Password"); $entry->setTextFormat("Password");
$entry->setId($name); $entry->setId($name);