PHP8.1 에 대응하기 위해 deprecated 되는 오류 등 수정
This commit is contained in:
@ -1511,7 +1511,7 @@ function hsc($str)
|
||||
// & · 등을 정상으로 출력
|
||||
function html_symbol($str)
|
||||
{
|
||||
return preg_replace("/\&([a-z0-9]{1,20}|\#[0-9]{0,3});/i", "&\\1;", $str);
|
||||
return $str ? preg_replace("/\&([a-z0-9]{1,20}|\#[0-9]{0,3});/i", "&\\1;", $str) : "";
|
||||
}
|
||||
|
||||
|
||||
@ -1609,7 +1609,11 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
if ($error) {
|
||||
$result = @mysqli_query($link, $sql) or die("<p>$sql<p>" . mysqli_errno($link) . " : " . mysqli_error($link) . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
|
||||
} else {
|
||||
$result = @mysqli_query($link, $sql);
|
||||
try {
|
||||
$result = @mysqli_query($link, $sql);
|
||||
} catch (Exception $e) {
|
||||
$result = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($error) {
|
||||
@ -1657,7 +1661,11 @@ function sql_fetch_array($result)
|
||||
if( ! $result) return array();
|
||||
|
||||
if(function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE)
|
||||
$row = @mysqli_fetch_assoc($result);
|
||||
try {
|
||||
$row = @mysqli_fetch_assoc($result);
|
||||
} catch (Exception $e) {
|
||||
$row = null;
|
||||
}
|
||||
else
|
||||
$row = @mysql_fetch_assoc($result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user