Browse Source

fix: missing type casting

M1Screw 1 year ago
parent
commit
8ad2d3686e

+ 1 - 1
resources/views/tabler/admin/user/index.tpl

@@ -118,7 +118,7 @@
             ],
             "columnDefs": [
                 {
-                    targets: [0],
+                    targets: [0, 6, 7],
                     orderable: false
                 },
             ],

+ 1 - 0
src/Controllers/User/DetectLogController.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Controllers\User;
 
 use App\Controllers\BaseController;
+use App\Models\Config;
 use App\Models\DetectLog;
 use App\Utils\Tools;
 use Exception;

+ 1 - 1
src/Services/Gateway/StripeCard.php

@@ -71,7 +71,7 @@ final class StripeCard extends Base
         $pl->tradeno = $trade_no;
         $pl->save();
 
-        $exchange_amount = (new Exchange())->exchange($price, 'CNY', Config::obtain('stripe_currency'));
+        $exchange_amount = (new Exchange())->exchange((float) $price, 'CNY', Config::obtain('stripe_currency'));
 
         Stripe::setApiKey(Config::obtain('stripe_sk'));
         $session = null;