Commit 49e802d8 authored by unknown's avatar unknown

add php8 support

parent c253c786
...@@ -15,7 +15,7 @@ require GAME_ROOT.'./include/game/revclubskills.func.php'; ...@@ -15,7 +15,7 @@ require GAME_ROOT.'./include/game/revclubskills.func.php';
require GAME_ROOT.'./include/game/dice.func.php'; require GAME_ROOT.'./include/game/dice.func.php';
error_reporting(E_ALL); error_reporting(E_ALL);
set_error_handler('gameerrorhandler'); set_error_handler('gameerrorhandler');
$magic_quotes_gpc = get_magic_quotes_gpc(); $magic_quotes_gpc = false;
extract(gstrfilter($_COOKIE)); extract(gstrfilter($_COOKIE));
extract(gstrfilter($_POST)); extract(gstrfilter($_POST));
extract(gstrfilter($_GET)); extract(gstrfilter($_GET));
......
...@@ -663,14 +663,14 @@ if(!$action) { ...@@ -663,14 +663,14 @@ if(!$action) {
$quit = TRUE; $quit = TRUE;
} }
if(@ini_get(file_uploads)) { if(function_exists('ini_get') && ini_get('file_uploads')) {
$max_size = @ini_get(upload_max_filesize); $max_size = ini_get('upload_max_filesize');
$curr_upload_status = $lang['attach_enabled'].$max_size; $curr_upload_status = $lang['attach_enabled'].$max_size;
$msg .= $lang['attach_enabled_info'].$max_size."\t"; $msg .= $lang['attach_enabled_info'].$max_size."\t";
} else { } else {
$curr_upload_status = $lang['attach_disabled']; $curr_upload_status = $lang['attach_disabled'];
$msg .= "<font color=\"#FF0000\">$lang[attach_disabled_info]</font>\t"; $msg .= "<font color=\"#FF0000\">$lang[attach_disabled_info]</font>\t";
} }
$query = $db->query("SELECT VERSION()"); $query = $db->query("SELECT VERSION()");
$curr_mysql_version = $db->result($query, 0); $curr_mysql_version = $db->result($query, 0);
...@@ -1308,11 +1308,7 @@ function createtable($db, $sql, $dbcharset) { ...@@ -1308,11 +1308,7 @@ function createtable($db, $sql, $dbcharset) {
} }
function setconfig($string) { function setconfig($string) {
if(!get_magic_quotes_gpc()) { $string = str_replace('\'', '\\\'', $string);
$string = str_replace('\'', '\\\'', $string);
} else {
$string = str_replace('\"', '"', $string);
}
return $string; return $string;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment