php deprecated 사용되는 코드 수정

This commit is contained in:
thisgun
2020-03-03 11:08:24 +09:00
parent 87bb2f1d8a
commit 799aefada2
2 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@ for ($i=0; $i<count($tmp_bo_table); $i++)
// 게시판 테이블 생성
$file = file("../".G5_ADMIN_DIR."/sql_write.sql");
$file = get_db_create_replace($file);
$sql = implode($file, "\n");
$sql = implode('\n', $file);
$create_table = $table_prefix.'write_' . $tmp_bo_table[$i];

View File

@ -46,7 +46,7 @@ function create_hash($password, $force_compat = false)
{
// Generate the salt.
if (function_exists('mcrypt_create_iv')) {
if (function_exists('mcrypt_create_iv') && version_compare( PHP_VERSION, '7.2' , '<' ) ) {
$salt = base64_encode(mcrypt_create_iv(PBKDF2_COMPAT_SALT_BYTES, MCRYPT_DEV_URANDOM));
} elseif (@file_exists('/dev/urandom') && $fp = @fopen('/dev/urandom', 'r')) {
$salt = base64_encode(fread($fp, PBKDF2_COMPAT_SALT_BYTES));