From 64f379d99d96dd3fdc069888a61cd78c4d8be751 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Mon, 30 Mar 2020 00:10:15 +0800 Subject: [PATCH] update --- app/Http/Controllers/User/OrderController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/User/OrderController.php b/app/Http/Controllers/User/OrderController.php index 65b5ba8d..fedec91c 100755 --- a/app/Http/Controllers/User/OrderController.php +++ b/app/Http/Controllers/User/OrderController.php @@ -100,6 +100,9 @@ class OrderController extends Controller { $dayPrice = 0; $day = ($user->expired_at - time()) / 86400; + if ($day <= 0) { + return 0; + } if ($plan->month_price) { $dayPrice = $plan->month_price / $day; } else if ($plan->quarter_price) {