add try catch to handle invalid value
This commit is contained in:
parent
97296abf06
commit
234e5e3967
@ -333,10 +333,25 @@ $unpaid = ORM::for_table('tbl_payment_gateway')
|
||||
->find_one();
|
||||
|
||||
// check expired payments
|
||||
if($unpaid && (strtotime($unpaid['expired_date']) < time() || strtotime($unpaid['created_date'], "+24 HOUR") < time())){
|
||||
$unpaid->status = 4;
|
||||
$unpaid->save();
|
||||
$unpaid = [];
|
||||
if ($unpaid) {
|
||||
try {
|
||||
if (strtotime($unpaid['expired_date']) < time()) {
|
||||
$unpaid->status = 4;
|
||||
$unpaid->save();
|
||||
$unpaid = [];
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
try {
|
||||
if (strtotime($unpaid['created_date'], "+24 HOUR") < time()) {
|
||||
$unpaid->status = 4;
|
||||
$unpaid->save();
|
||||
$unpaid = [];
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$ui->assign('unpaid', $unpaids);
|
||||
|
@ -846,5 +846,6 @@
|
||||
"If_you_just_update_PHPNuxBill_from_upload_files__try_click_Update": "If you just update PHPNuxBill from upload files, try click Update",
|
||||
"Update_PHPNuxBill": "Update PHPNuxBill",
|
||||
"Ask_Github_Community": "Ask Github Community",
|
||||
"Ask_Telegram_Community": "Ask Telegram Community"
|
||||
"Ask_Telegram_Community": "Ask Telegram Community",
|
||||
"Transaction_History_List": "Transaction History List"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user