From 9edb5de5c613179408dec4a548671e2ed39779e7 Mon Sep 17 00:00:00 2001 From: Beu Date: Thu, 25 May 2023 13:35:18 +0200 Subject: [PATCH] fix compatibility for php < 8 --- core/Server/ServerOptionsMenu.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Server/ServerOptionsMenu.php b/core/Server/ServerOptionsMenu.php index d1a5560b..89df9d74 100644 --- a/core/Server/ServerOptionsMenu.php +++ b/core/Server/ServerOptionsMenu.php @@ -294,7 +294,7 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList foreach ($serverOptionsArray as $name => $value) { // 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) { $pageFrame = new Frame(); @@ -328,7 +328,7 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList $optionsFrame->setY($posY - $optionHeight * 1.5); $posY -= $optionHeight * 3.; $index += 3; - } else if (str_contains($name, 'Password')) { + } else if (strpos($name, 'Password') !== false) { $entry->setTextFormat("Password"); $entry->setId($name);