Fix all PHP 8 deprecated/removed function usage across the repository

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/209fe796-9a38-47c1-a6b7-992ce11d038b

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-30 13:47:38 +00:00 committed by GitHub
parent 73319ffeed
commit c0bd0a0bb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 198 additions and 471 deletions

View file

@ -28,18 +28,12 @@ function connect2db() {
// -------------------------------------------------------------------------
global $net2ftp_settings;
$mydb = mysql_connect($net2ftp_settings["dbserver"], $net2ftp_settings["dbusername"], $net2ftp_settings["dbpassword"]);
$mydb = mysqli_connect($net2ftp_settings["dbserver"], $net2ftp_settings["dbusername"], $net2ftp_settings["dbpassword"], $net2ftp_settings["dbname"]);
if ($mydb == false) {
setErrorVars(false, __("Unable to connect to the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE__, __LINE__);
return false;
}
$result2 = mysql_select_db($net2ftp_settings["dbname"]);
if ($result2 == false) {
setErrorVars(false, __("Unable to select the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE__, __LINE__);
return false;
}
return $mydb;
} // End connect2db