diff --git a/webapp/classes/Privilege.php b/webapp/classes/Privilege.php index 73c60b5..fbf607d 100644 --- a/webapp/classes/Privilege.php +++ b/webapp/classes/Privilege.php @@ -55,7 +55,7 @@ class Privilege ) ); - if (!$row || $row['vip_info'] == NULL) { + if (!$row || is_null($row['vip_info'])) { return 0; } diff --git a/webapp/classes/RechargeActivity.php b/webapp/classes/RechargeActivity.php index 4044616..09f9ee0 100644 --- a/webapp/classes/RechargeActivity.php +++ b/webapp/classes/RechargeActivity.php @@ -37,7 +37,7 @@ class RechargeActivity ); $activity = array(); - if ($row && $row['activity'] != null && $row['activity'] != '') { + if ($row && !is_null($row['activity']) && !empty($row['activity'])) { $activity = json_decode($row['activity'], true); } diff --git a/webapp/controller/MailController.class.php b/webapp/controller/MailController.class.php index c3b0437..5342f5b 100644 --- a/webapp/controller/MailController.class.php +++ b/webapp/controller/MailController.class.php @@ -373,7 +373,7 @@ class MailController return; } - if ($rsp == null || $rsp == '') { + if (is_null($rsp) || empty($rsp)) { phpcommon\sendError(ERR_RETRY, '系统繁忙2'); return; } @@ -420,7 +420,7 @@ class MailController return; } - if ($rsp == null || $rsp == '') { + if (is_null($rsp) || empty($rsp)) { phpcommon\sendError(ERR_RETRY, '系统繁忙4'); return; } diff --git a/webapp/controller/RechargeActivity.trait.php b/webapp/controller/RechargeActivity.trait.php index ed11e7a..f6b14f1 100644 --- a/webapp/controller/RechargeActivity.trait.php +++ b/webapp/controller/RechargeActivity.trait.php @@ -217,7 +217,7 @@ trait RechargeActivity ) ); - if ($rechargerow['vip_info'] == null || $rechargerow['vip_info'] == '') { + if (is_null($rechargerow['vip_info']) || empty($rechargerow['vip_info'])) { phpcommon\sendError(ERR_USER_BASE + 1, '没月卡'); return; } @@ -354,7 +354,7 @@ trait RechargeActivity ) ); - if ($rechargerow['activity'] == null || $rechargerow['activity'] == '') { + if (is_null($rechargerow['activity']) || empty($rechargerow['activity'])) { phpcommon\sendError(ERR_USER_BASE + 1, '没参与活动'); return; } diff --git a/webapp/controller/RechargeController.class.php b/webapp/controller/RechargeController.class.php index 487166c..278d1f4 100644 --- a/webapp/controller/RechargeController.class.php +++ b/webapp/controller/RechargeController.class.php @@ -78,7 +78,7 @@ class RechargeController return; } - if ($rsp == null || $rsp == '') { + if (is_null($rsp) || empty($rsp)) { phpcommon\sendError(ERR_RETRY, '系统繁忙2'); return; } @@ -127,7 +127,7 @@ class RechargeController return; } - if ($rsp == null || $rsp == '') { + if (is_null($rsp) || empty($rsp)) { phpcommon\sendError(ERR_RETRY, '系统繁忙 2'); return; } @@ -176,7 +176,7 @@ class RechargeController $rechargeactivity = new classes\RechargeActivity(); $activity = array(); - if ($rechargerow && $rechargerow['activity'] != null && $rechargerow['activity'] != '') { + if ($rechargerow && !is_null($rechargerow['activity']) && !empty($rechargerow['activity'])) { $activity = json_decode($rechargerow['activity'], true); } $rechargeactivity->updateActivityCur($activity, $diamonds, true); @@ -206,7 +206,7 @@ class RechargeController $firstdata = $rechargerow['first_data']; if ($firstrecharge) { - if ($firstdata == NULL || $firstdata == '') { + if (is_null($firstdata) || empty($firstdata)) { $firstdata = $goodsid; } else { $firstdata = $rechargerow['first_data'] . ',' . $goodsid; @@ -304,7 +304,7 @@ class RechargeController return; } - if ($rsp == null || $rsp == '') { + if (is_null($rsp) || empty($rsp)) { phpcommon\sendError(ERR_RETRY, '系统繁忙2'); return; } @@ -434,7 +434,7 @@ class RechargeController } $daily_purchase = $rechargerow['daily_purchase']; - if ($daily_purchase == null || $daily_purchase == '') { + if (is_null($daily_purchase) || empty($daily_purchase)) { return true; } @@ -615,7 +615,7 @@ class RechargeController $firstdata = $rechargerow['first_data']; if ($firstrecharge) { - if ($firstdata == NULL || $firstdata == '') { + if (is_null($firstdata) || empty($firstdata)) { $firstdata = $goodsid; } else { $firstdata = $rechargerow['first_data'] . ',' . $goodsid; @@ -682,7 +682,7 @@ class RechargeController ); } else { $vip_info = array(); - if ($rechargerow['vip_info'] != NULL) { + if (!is_null($rechargerow['vip_info'])) { $vip_info = json_decode($rechargerow['vip_info'], true); } $found = false; @@ -784,7 +784,7 @@ class RechargeController ); } else { $daily_purchase = array(); - if ($rechargerow['daily_purchase'] != NULL) { + if (!is_null($rechargerow['daily_purchase'])) { $daily_purchase = json_decode($rechargerow['daily_purchase'], true); } $found = false;