From b0b4c5b4193a7e324ffed3f12f2a90225edfcc56 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 25 Jan 2021 16:17:06 +0900 Subject: [PATCH] =?UTF-8?q?PHP8=20=EC=97=90=EC=84=9C=20=EA=B2=BD=EA=B3=A0?= =?UTF-8?q?=EB=AC=B8=EC=9D=B4=20=EB=82=98=EC=98=AC=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemqaform.php | 4 +++- adm/shop_admin/itemstocklist.php | 3 ++- lib/shop.lib.php | 3 +++ mobile/shop/list.php | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/adm/shop_admin/itemqaform.php b/adm/shop_admin/itemqaform.php index 6e655a46c..5570ddff0 100644 --- a/adm/shop_admin/itemqaform.php +++ b/adm/shop_admin/itemqaform.php @@ -5,12 +5,14 @@ include_once(G5_EDITOR_LIB); auth_check_menu($auth, $sub_menu, "w"); +$iq_id = isset($_REQUEST['iq_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['iq_id']) : 0; + $sql = " select * from {$g5['g5_shop_item_qa_table']} a left join {$g5['member_table']} b on (a.mb_id = b.mb_id) where iq_id = '$iq_id' "; $iq = sql_fetch($sql); -if (!$iq['iq_id']) alert('등록된 자료가 없습니다.'); +if (! (isset($iq['iq_id']) && $iq['iq_id'])) alert('등록된 자료가 없습니다.'); $name = get_sideview($iq['mb_id'], get_text($iq['iq_name']), $iq['mb_email'], $iq['mb_homepage']); diff --git a/adm/shop_admin/itemstocklist.php b/adm/shop_admin/itemstocklist.php index 8f3aeb43b..bd2b5519d 100644 --- a/adm/shop_admin/itemstocklist.php +++ b/adm/shop_admin/itemstocklist.php @@ -139,8 +139,9 @@ $listall = '전체목 // 선택옵션이 있을 경우 주문대기 수량 계산하지 않음 $sql2 = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' "; $row2 = sql_fetch($sql2); + $wait_qty = 0; - if(!$row2['cnt']) { + if(! (isset($row2['cnt']) && $row2['cnt'])) { $sql1 = " select SUM(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where it_id = '{$row['it_id']}' diff --git a/lib/shop.lib.php b/lib/shop.lib.php index adec58be1..faf569494 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -471,6 +471,9 @@ function get_it_thumbnail($img, $width, $height=0, $id='', $is_crop=false) if(is_file($file)) $size = @getimagesize($file); + if (! (isset($size) && is_array($size))) + return ''; + if($size[2] < 1 || $size[2] > 3) return ''; diff --git a/mobile/shop/list.php b/mobile/shop/list.php index 91f041fc7..5165b5d5c 100644 --- a/mobile/shop/list.php +++ b/mobile/shop/list.php @@ -167,6 +167,7 @@ var g5_shop_url = ""; ?> 0 && $total_count > $items) { $qstr1 .= 'ca_id='.$ca_id; $qstr1 .='&sort='.$sort.'&sortodr='.$sortodr;