diff --git a/webapp/controller/RechargeController.class.php b/webapp/controller/RechargeController.class.php index 867d5e6..fa9dd16 100644 --- a/webapp/controller/RechargeController.class.php +++ b/webapp/controller/RechargeController.class.php @@ -314,6 +314,10 @@ class RechargeController $todaysecs = phpcommon\getdayseconds(time()); $daily_obj = json_decode($daily_purchase . true); + if (!$daily_obj) { + return true; + } + if ($productid == 10) { foreach ($daily_obj as $item) { if ($item['time'] > $todaysecs) { @@ -455,7 +459,10 @@ class RechargeController ) ); } else { - $vip_info = json_decode($rechargerow['vip_info'], true); + $vip_info = array(); + if ($rechargerow['vip_info'] != NULL) { + $vip_info = json_decode($rechargerow['vip_info'], true); + } $found = false; foreach ($vip_info as $key => $carditem) { if ($carditem['id'] == $_REQUEST['goodsid']) {