diff --git a/ManiaControl.php b/ManiaControl.php index 3ba6598b..57bcf10a 100644 --- a/ManiaControl.php +++ b/ManiaControl.php @@ -9,6 +9,8 @@ // Enable error reporting error_reporting(E_ALL); +// Change MySQLi report to match with policy before PHP 8.1 +mysqli_report(MYSQLI_REPORT_OFF); // Run configuration define('LOG_NAME_USE_DATE', true); // Use current date as suffix for log file name in logs folder diff --git a/core/Commands/HelpManager.php b/core/Commands/HelpManager.php index 6de5c72a..a69d91b9 100644 --- a/core/Commands/HelpManager.php +++ b/core/Commands/HelpManager.php @@ -280,7 +280,7 @@ class HelpManager implements CommandListener, CallbackListener, ManialinkPageAns * @param string $description * @param string $method */ - public function registerCommand($name, $adminCommand = false, $description = '', $method) { + public function registerCommand($name, $adminCommand = false, $description = '', $method = '') { // TODO replace with new class Command if ($adminCommand) { array_push($this->adminCommands, array("Name" => $name, "Description" => $description, "Method" => $method)); diff --git a/core/Statistics/StatisticManager.php b/core/Statistics/StatisticManager.php index 218fca47..5324e387 100644 --- a/core/Statistics/StatisticManager.php +++ b/core/Statistics/StatisticManager.php @@ -571,7 +571,7 @@ class StatisticManager implements UsageInformationAble { * @param string $statType * @return bool */ - public function insertStat($statName, Player $player, $serverIndex = -1, $value, $statType = self::STAT_TYPE_INT) { + public function insertStat($statName, Player $player, $serverIndex = -1, $value = 0, $statType = self::STAT_TYPE_INT) { // TODO: statType isn't used if (!$player) { return false; diff --git a/libs/curl-easy/cURL/RequestsQueue.php b/libs/curl-easy/cURL/RequestsQueue.php index 4b99826b..2f9529d6 100644 --- a/libs/curl-easy/cURL/RequestsQueue.php +++ b/libs/curl-easy/cURL/RequestsQueue.php @@ -131,7 +131,7 @@ class RequestsQueue extends EventDispatcher implements RequestsQueueInterface, \ * * @return int Handles count */ - public function count() { + public function count(): int { return count($this->queue); }