zhaoyang 1 éve
szülő
commit
69e0a7c688

+ 3 - 0
modules/Channel/Http/Controllers/PayTemplateController.php

@@ -76,6 +76,9 @@ class PayTemplateController extends CatchController
         $option_cache = [];
         $type_list = collect($this->optionTypeList())->pluck('value');
         foreach($option_list as $option){
+            if(!is_numeric($option['price']) || !is_numeric($option['given'])){
+                ChannelBusinessException::throwError(Errors::PARAM_ERROR);
+            }
             if($option['type'] == 'COIN' || $option['type'] == 'FIRST_COIN'){
                 if($option['given'] > 3*$option['price']*100){
                     ChannelBusinessException::throwError(Errors::PAY_TEMPLATE_GIVEN_TOO_MUCH);