From 25091a201b24e5829bebe9927dedc6b814049ea9 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 19 Dec 2022 11:13:08 +0900 Subject: [PATCH] =?UTF-8?q?PHP8=20=EB=B2=84=EC=A0=84=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EA=B2=BD=EA=B3=A0=EB=AC=B8=EC=9D=B4=20=EB=82=98=EC=98=AC?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8A=94=20=EC=BD=94=EB=93=9C=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 --- bbs/good.php | 4 ++-- lib/icode.lms.lib.php | 4 ++-- lib/icode.sms.lib.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bbs/good.php b/bbs/good.php index 7627c5aa3..a82dd1495 100644 --- a/bbs/good.php +++ b/bbs/good.php @@ -62,7 +62,7 @@ if(isset($_POST['js']) && $_POST['js'] === "on") { and mb_id = '{$member['mb_id']}' and bg_flag in ('good', 'nogood') "; $row = sql_fetch($sql); - if ($row['bg_flag']) + if (isset($row['bg_flag']) && $row['bg_flag']) { if ($row['bg_flag'] == 'good') $status = '추천'; @@ -127,7 +127,7 @@ if(isset($_POST['js']) && $_POST['js'] === "on") { and mb_id = '{$member['mb_id']}' and bg_flag in ('good', 'nogood') "; $row = sql_fetch($sql); - if ($row['bg_flag']) + if (isset($row['bg_flag']) && $row['bg_flag']) { if ($row['bg_flag'] == 'good') $status = '추천'; diff --git a/lib/icode.lms.lib.php b/lib/icode.lms.lib.php index 2d27c800e..436206c0e 100644 --- a/lib/icode.lms.lib.php +++ b/lib/icode.lms.lib.php @@ -195,6 +195,7 @@ class LMS { foreach($this->Data as $puts) { fputs($fsocket, $puts); + $gets = ''; while(!$gets) { $gets = fgets($fsocket,32); } $json = json_decode(substr($puts,6), true); @@ -206,7 +207,6 @@ class LMS { $this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")"; if(substr($gets,6,2) >= "80") break; } - $gets = ""; } fclose($fsocket); @@ -217,6 +217,7 @@ class LMS { foreach($this->Data as $puts) { fputs($fsocket, $puts); + $gets = ''; while(!$gets) { $gets = fgets($fsocket,30); } $dest = substr($puts,26,11); if (substr($gets,0,19) == "0223 00".$dest) { @@ -224,7 +225,6 @@ class LMS { } else { $this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")"; } - $gets = ""; } fclose($fsocket); diff --git a/lib/icode.sms.lib.php b/lib/icode.sms.lib.php index 0061b6653..e38812339 100644 --- a/lib/icode.sms.lib.php +++ b/lib/icode.sms.lib.php @@ -198,6 +198,7 @@ class SMS { foreach($this->Data as $puts) { fputs($fsocket, $puts); + $gets = ''; while(!$gets) { $gets = fgets($fsocket,32); } $json = json_decode(substr($puts,6), true); @@ -209,7 +210,6 @@ class SMS { $this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")"; if(substr($gets,6,2) >= "80") break; } - $gets = ""; } fclose($fsocket); @@ -226,10 +226,10 @@ class SMS { foreach($this->Data as $puts) { $dest = substr($puts,26,11); fputs($fp,$puts); + $gets = ''; while(!$gets) { $gets=fgets($fp,30); } if (substr($gets,0,19)=="0223 00".$dest) $this->Result[]=$dest.":".substr($gets,19,10); else $this->Result[$dest]=$dest.":Error"; - $gets=""; } fclose($fp); }