15313670163 há 1 mês atrás
pai
commit
1cab700b91
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      app/JsonRpc/NewsService.php

+ 3 - 1
app/JsonRpc/NewsService.php

@@ -611,8 +611,10 @@ class NewsService implements NewsServiceInterface
                         if(!empty($choice_id)){
                         if(!empty($choice_id)){
                             $key = array_search($choice['other']['id'], $choice_id);
                             $key = array_search($choice['other']['id'], $choice_id);
                             if ($key!== false) {
                             if ($key!== false) {
-                                $$choice_id[$key]=$choice['other']['other_id'];
+                                unset($choice_id[$key]);
+                                $choice_id = array_values($choice_id);
                             }
                             }
+                            array_push($choice_id,$choice['other']['other_id']);
                         }else{
                         }else{
                             $choice_id[0] = $choice['other']['other_id'];
                             $choice_id[0] = $choice['other']['other_id'];
                         }
                         }