From 66d929ff9fb75fb37e139b95a5ada38af8ae3f40 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sun, 23 Oct 2022 12:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E4=B8=BA=200=20=E5=B0=B1?= =?UTF-8?q?=E4=B8=8D=E6=89=A3=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Host.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Models/Host.php b/app/Models/Host.php index d27d519..00d1a2d 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -99,7 +99,11 @@ public function cost($price = null, $auto = true) $real_price = $price; } - $real_price = round($real_price, 8); + if ($price == 0) { + return true; + } + + $real_price = round($real_price ?? 0, 8); $amount = $price / config('drops.rate') + 1;