PHP 8.1 설치 오류 수정

This commit is contained in:
kit rio
2022-06-03 15:55:30 +09:00
committed by thisgun
parent fc43e26c14
commit 7950307173
2 changed files with 21 additions and 20 deletions

View File

@ -14,7 +14,7 @@ if (file_exists($dbconfig_file)) {
die(install_json_msg('프로그램이 이미 설치되어 있습니다.'));
}
if (isset($_POST['table_prefix']) && preg_match("/[^0-9a-z_]+/i", $_POST['table_prefix']) ) {
if (isset($_POST['table_prefix']) && preg_match("/[^0-9a-z_]+/i", $_POST['table_prefix'])) {
die(install_json_msg('TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.'));
}
@ -29,7 +29,7 @@ $ajax_token = md5($tmp_str.$_SERVER['REMOTE_ADDR'].dirname(dirname(__FILE__).'/'
$bool_ajax_token = (isset($_POST['ajax_token']) && ($ajax_token == $_POST['ajax_token'])) ? true : false;
if( !($mysql_host && $mysql_user && $mysql_pass && $mysql_db && $table_prefix && $bool_ajax_token) ){
if (!($mysql_host && $mysql_user && $mysql_pass && $mysql_db && $table_prefix && $bool_ajax_token)) {
die(install_json_msg('잘못된 요청입니다.'));
}
@ -38,7 +38,7 @@ try {
} catch (Exception $e) {
}
if (!$dblink) {
if (!isset($dblink)) {
die(install_json_msg('MySQL Host, User, Password 를 확인해 주십시오.'));
}
@ -47,11 +47,11 @@ try {
} catch (Exception $e) {
}
if (!$select_db) {
if (!isset($select_db)) {
die(install_json_msg('MySQL DB 를 확인해 주십시오.'));
}
if(sql_query("DESCRIBE `{$table_prefix}config`", G5_DISPLAY_SQL_ERROR, $dblink)) {
if (sql_query("SHOW TABLES LIKE `{$table_prefix}config`", G5_DISPLAY_SQL_ERROR, $dblink)) {
die(install_json_msg('주의! 이미 테이블이 존재하므로, 기존 DB 자료가 망실됩니다. 계속 진행하겠습니까?', 'exists'));
}