This commit is contained in:
Amberstone 2024-09-23 09:37:13 +09:00
parent 90a6f8bb5e
commit 324c6b8ce5
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
35 changed files with 97 additions and 97 deletions

View file

@ -22,7 +22,7 @@ $sql = get_table_define($g5['write_prefix'] . $bo_table);
$sql = str_replace($g5['write_prefix'] . $bo_table, $g5['write_prefix'] . $target_table, $sql);
sql_query($sql, false);
$file_copy = array();
$file_copy = [];
// 구조만 복사시에는 공지사항 번호는 복사하지 않는다.
if ($copy_case == 'schema_only') {

View file

@ -15,7 +15,7 @@ $g5['title'] = '디자인 설정';
include_once('./admin.head.php');
$design_result = sql_query("select * from {$g5['css_table']}");
$de = array();
$de = [];
for ($i = 0; $row = sql_fetch_array($design_result); $i++) {
$de[$row['cs_name']] = $row;
}
@ -55,7 +55,7 @@ if ($config['cf_add_fonts']) {
}
$css_index = 0;
$editor_list = array();
$editor_list = [];
?>
<style>

View file

@ -4,7 +4,7 @@
// CSS 설정 가져오기
$css_sql = sql_query("select * from {$g5['css_table']}");
$css = array();
$css = [];
for ($i = 0; $cs = sql_fetch_array($css_sql); $i++) {
$css[$cs['cs_name']][0] = $cs['cs_value'];
$css[$cs['cs_name']][1] = $cs['cs_etc_1'];

View file

@ -3,7 +3,7 @@ $sub_menu = "100280";
include_once('./_common.php');
include_once(G5_LIB_PATH . '/json.lib.php');
$data = array();
$data = [];
$data['error'] = '';
$data['error'] = auth_check_menu($auth, $sub_menu, 'w', true);
if ($data['error'])
@ -87,7 +87,7 @@ if ($type == 'board') {
if ($i == 0)
$data['error'] = '적용할 쇼핑몰 스킨 설정이 없습니다.';
} else if ($type == 'shop_pc_index') {
$keys = array();
$keys = [];
for ($i = 1; $i <= 5; $i++) {
$keys[] = 'de_type' . $i . '_list_use';
$keys[] = 'de_type' . $i . '_list_skin';
@ -111,7 +111,7 @@ if ($type == 'board') {
if ($i == 0)
$data['error'] = '적용할 테마 설정이 없습니다.';
} else if ($type == 'shop_mobile_index') {
$keys = array();
$keys = [];
for ($i = 1; $i <= 5; $i++) {
$keys[] = 'de_mobile_type' . $i . '_list_use';
$keys[] = 'de_mobile_type' . $i . '_list_skin';

View file

@ -33,9 +33,9 @@ if ($post_set_default_skin == 1) {
$tconfig = get_theme_config_value($theme, $keys);
if ($tconfig['set_default_skin']) {
$sql_common = array();
$qa_sql_common = array();
$de_sql_common = array();
$sql_common = [];
$qa_sql_common = [];
$de_sql_common = [];
foreach ($tconfig as $key => $val) {
if (preg_match('#^qa_.+$#', $key)) {

View file

@ -16,7 +16,7 @@ include_once('./admin.head.php');
</div>
<?php
$directory = array();
$directory = [];
$dl = array('file', 'editor');
foreach ($dl as $val) {

View file

@ -73,7 +73,7 @@ $colspan = 8;
/** 세력 정보 **/
$ch_si = array();
$ch_si = [];
if ($config['cf_side_title']) {
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
for ($i = 0; $row = sql_fetch_array($side_result); $i++) {
@ -83,7 +83,7 @@ if ($config['cf_side_title']) {
}
/** 종족 정보 **/
$ch_cl = array();
$ch_cl = [];
if ($config['cf_class_title']) {
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
for ($i = 0; $row = sql_fetch_array($class_result); $i++) {

View file

@ -4,7 +4,7 @@ include_once('./_common.php');
$g5['title'] = '현재접속자';
include_once('./_head.php');
$list = array();
$list = [];
$sql = " select a.mb_id, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, b.mb_point, a.lo_ip, a.lo_location, a.lo_url
from {$g5['login_table']} a left join {$g5['member_table']} b on (a.mb_id = b.mb_id)

View file

@ -11,7 +11,7 @@ if (!$is_admin)
$count_write = 0;
$count_comment = 0;
$tmp_array = array();
$tmp_array = [];
if ($wr_id) // 건별삭제
$tmp_array[0] = $wr_id;
else // 일괄삭제

View file

@ -7,7 +7,7 @@ if (!isset($g5['faq_table']) || !isset($g5['faq_master_table'])) {
}
// FAQ MASTER
$faq_master_list = array();
$faq_master_list = [];
$sql = " select * from {$g5['faq_master_table']} order by fm_order,fm_id ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
@ -52,7 +52,7 @@ if (is_file($skin_file)) {
$category_href = G5_BBS_URL . '/faq.php';
$category_stx = '';
$faq_list = array();
$faq_list = [];
$stx = trim($stx);
$sql_search = '';

View file

@ -21,7 +21,7 @@ if (!chk_captcha()) {
}
$file = array();
$file = [];
for ($i = 1; $i <= $attach; $i++) {
if ($_FILES['file' . $i]['name'])
$file[] = attach_file($_FILES['file' . $i]['name'], $_FILES['file' . $i]['tmp_name']);

View file

@ -2,9 +2,9 @@
include_once('./_common.php');
// 진영별로 출력하기
$list = array();
$side = array();
$ch_list = array();
$list = [];
$side = [];
$ch_list = [];
if ($config['cf_side_title']) {
$side_result = sql_query("select * from {$g5['side_table']}");
@ -15,8 +15,8 @@ if ($config['cf_side_title']) {
}
if (!$config['cf_side_title'] || count($side) < 2) {
$list = array();
$side = array();
$list = [];
$side = [];
$list[] = get_character_list();
$side[] = '';

View file

@ -77,10 +77,10 @@ if ($page < 1) {
// 년도 2자리
$today2 = G5_TIME_YMD;
$list = array();
$list = [];
$i = 0;
$notice_count = 0;
$notice_array = array();
$notice_array = [];
// 공지 처리
if (!$sca && !$stx) {

View file

@ -82,10 +82,10 @@ if ($page < 1) {
// 년도 2자리
$today2 = G5_TIME_YMD;
$list = array();
$list = [];
$i = 0;
$notice_count = 0;
$notice_array = array();
$notice_array = [];
// 공지 처리
if (!$sca && !$stx) {

View file

@ -34,7 +34,7 @@ if ($kind == 'recv') {
$send_img = 'on';
}
$list = array();
$list = [];
$sql = " select a.*, b.mb_id, b.mb_nick, b.mb_email, b.mb_homepage
from {$g5['memo_table']} a

View file

@ -12,8 +12,8 @@ if (!chk_captcha()) {
$recv_list = explode(',', trim($_POST['me_recv_mb_id']));
$str_nick_list = '';
$msg = '';
$error_list = array();
$member_list = array();
$error_list = [];
$member_list = [];
for ($i = 0; $i < count($recv_list); $i++) {
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g5['member_table']} where mb_id = '{$recv_list[$i]}' ");
if ($row) {

View file

@ -14,7 +14,7 @@ if (!count($_POST['chk_bo_table']))
// 원본 파일 디렉토리
$src_dir = G5_DATA_PATH . '/file/' . $bo_table;
$save = array();
$save = [];
$save_count_write = 0;
$save_count_comment = 0;
$cnt = 0;

View file

@ -46,7 +46,7 @@ for ($i = 0; $row = sql_fetch_array($result); $i++) {
}
$group_select .= '</select>';
$list = array();
$list = [];
$sql = " select a.*, b.bo_subject, b.bo_mobile_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {

View file

@ -6,8 +6,8 @@ include_once('./_common.php');
if ($is_admin != 'super')
alert("최고관리자만 접근이 가능합니다.");
$board = array();
$save_bo_table = array();
$board = [];
$save_bo_table = [];
for ($i = 0; $i < count($_POST['chk_bn_id']); $i++) {
// 실제 번호를 넘김

View file

@ -7,7 +7,7 @@ if ($is_guest)
$g5['title'] = get_text($member['mb_nick']) . ' 님의 포인트 내역';
include_once(G5_PATH . '/head.sub.php');
$list = array();
$list = [];
$sql_common = " from {$g5['point_table']} where mb_id = '" . escape_trim($member['mb_id']) . "' ";
$sql_order = " order by po_id desc ";

View file

@ -28,7 +28,7 @@ for ($i = 1; $i <= 9; $i++) {
}
$nf_total_po_cnt = number_format($total_po_cnt);
$list = array();
$list = [];
for ($i = 1; $i <= 9; $i++) {
$poll = $po['po_poll' . $i];
@ -47,7 +47,7 @@ for ($i = 1; $i <= 9; $i++) {
$list[$i]['num'] = $i;
}
$list2 = array();
$list2 = [];
// 기타의견 리스트
$sql = " select a.*, b.mb_open
@ -77,7 +77,7 @@ if ($po['po_etc']) {
$name = '<input type="text" name="pc_name" size="10" class="input" required>';
}
$list3 = array();
$list3 = [];
// 다른투표
$sql = " select po_id, po_subject, po_date from {$g5['poll_table']} order by po_id desc ";

View file

@ -4,7 +4,7 @@ include_once('./_common.php');
if ($is_guest)
alert('회원이시라면 로그인 후 이용해 주십시오.', G5_URL);
$tmp_array = array();
$tmp_array = [];
if ($qa_id) // 건별삭제
$tmp_array[0] = $qa_id;
else // 일괄삭제

View file

@ -79,7 +79,7 @@ if (is_file($skin_file)) {
limit $from_record, $page_rows ";
$result = sql_query($sql);
$list = array();
$list = [];
$num = $total_count - ($page - 1) * $page_rows;
$subject_len = $qaconfig['qa_subject_len'];
for ($i = 0; $row = sql_fetch_array($result); $i++) {

View file

@ -79,7 +79,7 @@ if (is_file($skin_file)) {
limit 0, $rows ";
$result = sql_query($sql);
$rel_list = array();
$rel_list = [];
$rel_count = 0;
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$rel_list[$i] = $row;
@ -113,7 +113,7 @@ if (is_file($skin_file)) {
}
// 질문글이고 등록된 답변이 있다면
$answer = array();
$answer = [];
$answer_update_href = '';
$answer_delete_href = '';
if (!$view['qa_type'] && $view['qa_status']) {
@ -146,9 +146,9 @@ if (is_file($skin_file)) {
set_session($ss_name, TRUE);
// 첨부파일
$view['img_file'] = array();
$view['download_href'] = array();
$view['download_source'] = array();
$view['img_file'] = [];
$view['download_href'] = [];
$view['download_source'] = [];
$view['img_count'] = 0;
$view['download_count'] = 0;

View file

@ -10,7 +10,7 @@ $w == u : 수정
if ($is_guest)
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url=' . urlencode(G5_BBS_URL . '/qalist.php'));
$msg = array();
$msg = [];
// 1:1문의 설정값
$qaconfig = get_qa_config();
@ -132,7 +132,7 @@ $chars_array = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z'));
// 가변 파일 업로드
$file_upload_msg = '';
$upload = array();
$upload = [];
for ($i = 1; $i <= count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['file'] = '';
$upload[$i]['source'] = '';
@ -334,7 +334,7 @@ if ($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) {
$recv_number = preg_replace('/[^0-9]/', '', $write['qa_hp']);
if ($recv_number) {
$strDest = array();
$strDest = [];
$strDest[] = $recv_number;
$strCallBack = $send_number;
$strCaller = iconv_euckr(trim($config['cf_title']));
@ -363,7 +363,7 @@ if ($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) {
$recv_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_admin_hp']);
if ($recv_number) {
$strDest = array();
$strDest = [];
$strDest[] = $recv_number;
$strCallBack = $send_number;
$strCaller = iconv_euckr(trim($config['cf_title']));

View file

@ -20,7 +20,7 @@ if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$list = array();
$list = [];
$sql = " select *
$sql_common

View file

@ -4,7 +4,7 @@ include_once('./_common.php');
$g5['title'] = '전체검색 결과';
include_once('./_head.php');
$search_table = array();
$search_table = [];
$table_index = 0;
$write_pages = "";
$text_stx = "";
@ -22,8 +22,8 @@ if ($stx) {
if (!$srows)
$srows = 10; // 한페이지에 출력하는 검색 행수
$g5_search['tables'] = array();
$g5_search['read_level'] = array();
$g5_search['tables'] = [];
$g5_search['read_level'] = [];
$sql = " select gr_id, bo_table, bo_read_level from {$g5['board_table']} where bo_use_search = 1 and bo_list_level <= '{$member['mb_level']}' ";
if ($gr_id)
$sql .= " and gr_id = '{$gr_id}' ";
@ -157,8 +157,8 @@ if ($stx) {
}
}
$bo_subject = array();
$list = array();
$bo_subject = [];
$list = [];
$k = 0;
for ($idx = $table_index; $idx < count($search_table); $idx++) {

View file

@ -10,7 +10,7 @@ if ($is_guest && $board['bo_comment_level'] < 2) {
@include_once($board_skin_path . '/view_comment.head.skin.php');
$list = array();
$list = [];
$is_comment_write = false;
if ($member['mb_level'] >= $board['bo_comment_level'])

View file

@ -213,7 +213,7 @@ if ($w == 'c') // 댓글 입력
$content = ob_get_contents();
ob_end_clean();
$array_email = array();
$array_email = [];
// 게시판관리자에게 보내는 메일
if ($config['cf_email_wr_board_admin'])
$array_email[] = $board_admin['mb_email'];

View file

@ -8,7 +8,7 @@ include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
$g5['title'] = '게시글 저장';
$msg = array();
$msg = [];
if ($board['bo_use_category']) {
$ca_name = trim($_POST['ca_name']);
@ -476,14 +476,14 @@ $chars_array = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z'));
// 가변 파일 업로드
$file_upload_msg = '';
$upload = array();
$upload = [];
if ($upload_count != 0) {
for ($i = 0; $i < count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['file'] = '';
$upload[$i]['source'] = '';
$upload[$i]['filesize'] = 0;
$upload[$i]['image'] = array();
$upload[$i]['image'] = [];
$upload[$i]['image'][0] = '';
$upload[$i]['image'][1] = '';
$upload[$i]['image'][2] = '';
@ -686,7 +686,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
$content = ob_get_contents();
ob_end_clean();
$array_email = array();
$array_email = [];
// 게시판관리자에게 보내는 메일
if ($config['cf_email_wr_board_admin'])
$array_email[] = $board_admin['mb_email'];

View file

@ -8,7 +8,7 @@ include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
$g5['title'] = '게시글 저장';
$msg = array();
$msg = [];
if ($board['bo_use_category']) {
$ca_name = trim($_POST['ca_name']);
@ -472,12 +472,12 @@ $chars_array = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z'));
// 가변 파일 업로드
$file_upload_msg = '';
$upload = array();
$upload = [];
for ($i = 0; $i < count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['file'] = '';
$upload[$i]['source'] = '';
$upload[$i]['filesize'] = 0;
$upload[$i]['image'] = array();
$upload[$i]['image'] = [];
$upload[$i]['image'][0] = '';
$upload[$i]['image'][1] = '';
$upload[$i]['image'][2] = '';
@ -678,7 +678,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
$content = ob_get_contents();
ob_end_clean();
$array_email = array();
$array_email = [];
// 게시판관리자에게 보내는 메일
if ($config['cf_email_wr_board_admin'])
$array_email[] = $board_admin['mb_email'];

View file

@ -207,12 +207,12 @@ $_REQUEST = array_map_deep(G5_ESCAPE_FUNCTION, $_REQUEST);
// 완두콩님이 알려주신 보안관련 오류 수정
// $member 에 값을 직접 넘길 수 있음
$config = array();
$member = array();
$board = array();
$group = array();
$article = array();
$g5 = array();
$config = [];
$member = [];
$board = [];
$group = [];
$article = [];
$g5 = [];
//==============================================================================
// 공통
@ -481,7 +481,7 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
// 차단된 회원이면 ss_mb_id 초기화
if ($member['mb_intercept_date'] && $member['mb_intercept_date'] <= date("Ymd", G5_SERVER_TIME)) {
set_session('ss_mb_id', '');
$member = array();
$member = [];
} else {
// 오늘 처음 로그인 이라면
if (substr($member['mb_today_login'], 0, 10) != G5_TIME_YMD) {
@ -530,7 +530,7 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
}
$write = array();
$write = [];
$write_table = "";
if ($bo_table) {
$board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '$bo_table' ");
@ -749,7 +749,7 @@ include_once (G5_BBS_PATH . '/visit_insert.inc.php');
include_once (G5_BBS_PATH . '/db_table.optimize.php');
// common.php 파일을 수정할 필요가 없도록 확장합니다.
$extend_file = array();
$extend_file = [];
$tmp = dir(G5_EXTEND_PATH);
while ($entry = $tmp->read()) {
// php 파일만 include 함
@ -768,7 +768,7 @@ unset($extend_file);
// ----- 테마 추가기능 불러오기 (확장)
if (defined('G5_THEME_PATH')) {
$extend_file = array();
$extend_file = [];
$tmp = dir(G5_THEME_PATH . '/' . G5_EXTEND_DIR);
while ($entry = $tmp->read()) {
// php 파일만 include 함

View file

@ -61,11 +61,11 @@ function get_sql_search_mmb($search_ca_name, $search_field, $search_text, $searc
$op1 = "";
// 검색어를 구분자로 나눈다. 여기서는 공백
$s = array();
$s = [];
$s = explode(" ", $search_text);
// 검색필드를 구분자로 나눈다. 여기서는 +
$tmp = array();
$tmp = [];
$tmp = explode(",", trim($search_field));
$field = explode("||", $tmp[0]);
$not_comment = "";

View file

@ -509,8 +509,8 @@ function conv_content($content, $html, $filter = true)
global $config, $board;
if ($html) {
$source = array();
$target = array();
$source = [];
$target = [];
$source[] = "//";
$target[] = "";
@ -557,7 +557,7 @@ function conv_content($content, $html, $filter = true)
function html_purifier($html)
{
$f = file(G5_PLUGIN_PATH . '/htmlpurifier/safeiframe.txt');
$domains = array();
$domains = [];
foreach ($f as $domain) {
// 첫행이 # 이면 주석 처리
if (!preg_match("/^#/", $domain)) {
@ -612,11 +612,11 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
$op1 = "";
// 검색어를 구분자로 나눈다. 여기서는 공백
$s = array();
$s = [];
$s = explode(" ", $search_text);
// 검색필드를 구분자로 나눈다. 여기서는 +
$tmp = array();
$tmp = [];
$tmp = explode(",", trim($search_field));
$field = explode("||", $tmp[0]);
$not_comment = "";
@ -744,7 +744,7 @@ function subject_sort_link($col, $query_string = '', $flag = 'asc')
}
}
$arr_query = array();
$arr_query = [];
$arr_query[] = $query_string;
$arr_query[] = $q1;
$arr_query[] = $q2;
@ -1558,7 +1558,7 @@ function sql_fetch($sql, $error = G5_DISPLAY_SQL_ERROR, $link = null)
function sql_fetch_array($result)
{
if (!$result)
return array();
return [];
if (function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE)
try {
@ -1627,7 +1627,7 @@ function sql_field_names($table, $link = null)
if (!$link)
$link = $g5['connect_db'];
$columns = array();
$columns = [];
$sql = " select * from `$table` limit 1 ";
$result = sql_query($sql, $link);
@ -1705,7 +1705,7 @@ function get_table_define($table, $crlf = "\n")
$kname = 'FULLTEXT|$kname';
}
if (!isset($index[$kname])) {
$index[$kname] = array();
$index[$kname] = [];
}
if ($sub_part > 1) {
$index[$kname][] = $row['Column_name'] . '(' . $sub_part . ')';
@ -2274,7 +2274,7 @@ function get_skin_stylesheet($skin_path, $dir = '')
return "";
$str = "";
$files = array();
$files = [];
if ($dir)
$skin_path .= '/' . $dir;
@ -2330,7 +2330,7 @@ function get_skin_javascript($skin_path, $dir = '')
return "";
$str = "";
$files = array();
$files = [];
if ($dir)
$skin_path .= '/' . $dir;
@ -2407,8 +2407,8 @@ function add_javascript($javascript, $order = 0)
class html_process
{
protected $css = array();
protected $js = array();
protected $css = [];
protected $js = [];
function merge_stylesheet($stylesheet, $order)
{
@ -2880,13 +2880,13 @@ function conv_date_format($format, $date, $add = '')
// 검색어 특수문자 제거
function get_search_string($stx)
{
$stx_pattern = array();
$stx_pattern = [];
$stx_pattern[] = '#\.*/+#';
$stx_pattern[] = '#\\\*#';
$stx_pattern[] = '#\.{2,}#';
$stx_pattern[] = '#[/\'\"%=*\#\(\)\|\+\&\!\$~\{\}\[\]`;:\?\^\,]+#';
$stx_replace = array();
$stx_replace = [];
$stx_replace[] = '';
$stx_replace[] = '';
$stx_replace[] = '.';
@ -3219,7 +3219,7 @@ function clean_query_string($query, $amp = true)
parse_str($qstr, $out);
if (is_array($out)) {
$q = array();
$q = [];
foreach ($out as $key => $val) {
$key = strip_tags(trim($key));
@ -3303,7 +3303,7 @@ function get_device_change_url()
$href .= ':' . $p['port'];
$href .= $_SERVER['SCRIPT_NAME'];
$q = array();
$q = [];
$device = 'device=' . (G5_IS_MOBILE ? 'pc' : 'mobile');
if ($_SERVER['QUERY_STRING']) {
@ -3478,7 +3478,7 @@ function is_include_path_check($path = '', $is_input = '')
// resolve path parts (single dot, double dot and double delimiters)
$path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
$parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');
$absolutes = array();
$absolutes = [];
foreach ($parts as $part) {
if ('.' == $part) {
continue;

View file

@ -44,7 +44,7 @@ function run_event($tag, $arg = '')
if ($hook = get_hook_class()) {
$args = array();
$args = [];
if (
is_array($arg)
@ -85,7 +85,7 @@ function run_replace($tag, $arg = '')
if ($hook = get_hook_class()) {
$args = array();
$args = [];
if (
is_array($arg)