diff --git a/adm/board_form_update.php b/adm/board_form_update.php index 557a1a2a6..9f9644052 100644 --- a/adm/board_form_update.php +++ b/adm/board_form_update.php @@ -28,7 +28,7 @@ $bo_include_head = isset($_POST['bo_include_head']) ? preg_replace(array("#[\\\] $bo_include_tail = isset($_POST['bo_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_tail'], 0, 255)) : ''; // 관리자가 자동등록방지를 사용해야 할 경우 -if ($board && ($board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){ +if ($board && (isset($board['bo_include_head']) && $board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){ include_once(G5_CAPTCHA_PATH.'/captcha.lib.php'); if (!chk_captcha()) { diff --git a/adm/dbupgrade.php b/adm/dbupgrade.php index 3f6a4be3d..7ac478d40 100644 --- a/adm/dbupgrade.php +++ b/adm/dbupgrade.php @@ -197,7 +197,7 @@ if (defined('G5_USE_SHOP') && G5_USE_SHOP) { $result = sql_query("describe `{$g5['g5_shop_post_log_table']}`"); while ($row = sql_fetch_array($result)){ - if( $row['Field'] === 'ol_msg' && $row['Type'] === 'varchar(255)' ){ + if( isset($row['Field']) && $row['Field'] === 'ol_msg' && $row['Type'] === 'varchar(255)' ){ sql_query("ALTER TABLE `{$g5['g5_shop_post_log_table']}` MODIFY ol_msg TEXT NOT NULL;", false); sql_query("ALTER TABLE `{$g5['g5_shop_post_log_table']}` DROP PRIMARY KEY;", false); sql_query("ALTER TABLE `{$g5['g5_shop_post_log_table']}` ADD `log_id` int(11) NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (`log_id`);", false); diff --git a/common.php b/common.php index dd4c2e1af..80171c164 100644 --- a/common.php +++ b/common.php @@ -2,7 +2,9 @@ /******************************************************************************* ** 공통 변수, 상수, 코드 *******************************************************************************/ -error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING ); +// error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING ); +error_reporting(E_ALL); +ini_set("display_errors", 1); // 보안설정이나 프레임이 달라도 쿠키가 통하도록 설정 header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"'); diff --git a/lib/common.lib.php b/lib/common.lib.php index b9fae59b4..1b0acda5e 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -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("

$sql

" . mysqli_errno($link) . " : " . mysqli_error($link) . "

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); diff --git a/plugin/htmlpurifier/HTMLPurifier.standalone.php b/plugin/htmlpurifier/HTMLPurifier.standalone.php index 6e9db001f..d889e6af3 100644 --- a/plugin/htmlpurifier/HTMLPurifier.standalone.php +++ b/plugin/htmlpurifier/HTMLPurifier.standalone.php @@ -8319,7 +8319,10 @@ class HTMLPurifier_PropertyListIterator extends FilterIterator /** * @return bool + * + * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function accept() { $key = $this->getInnerIterator()->key(); @@ -8437,7 +8440,10 @@ class HTMLPurifier_StringHash extends ArrayObject * Retrieves a value, and logs the access. * @param mixed $index * @return mixed + * + * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function offsetGet($index) { $this->accessed[$index] = true;