ryan 1 tydzień temu
rodzic
commit
42e13b312d

+ 3 - 3
frontendApi/modules/v1/controllers/ShopController.php

@@ -211,13 +211,13 @@ class ShopController extends BaseController {
      */
     public function actionNoLoginShowCart(){
         $countryId = Yii::$app->request->get('countryId');
-        if (!filter_var($countryId, FILTER_VALIDATE_INT) || (int)$countryId <= 0) {
+        if (!filter_var($countryId, FILTER_VALIDATE_INT) || $countryId <= 0) {
             return static::notice('countryId is required', 400);
         }
 
         $user = User::find()
             ->select('ID,COUNTRY_ID')
-            ->where(['COUNTRY_ID' => (int)$countryId, 'IS_DEC' => 1])
+            ->where(['COUNTRY_ID' => $countryId, 'IS_DEC' => 1])
             ->orderBy(['USER_NAME' => SORT_ASC])
             ->asArray()
             ->one();
@@ -801,7 +801,7 @@ class ShopController extends BaseController {
      */
     public function actionNoLoginReconsume() {
         $countryId = Yii::$app->request->get('countryId');
-        if (!filter_var($countryId, FILTER_VALIDATE_INT) || (int)$countryId <= 0) {
+        if (!filter_var($countryId, FILTER_VALIDATE_INT) || $countryId <= 0) {
             return static::notice('countryId is required', 400);
         }