ZxcZxc123 2 năm trước cách đây
mục cha
commit
9c938174a4
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      app/api/controller/Education.php

+ 6 - 1
app/api/controller/Education.php

@@ -145,7 +145,12 @@ class Education
             ];
             ];
             $course_list[] = $course_info;
             $course_list[] = $course_info;
         }
         }
-        $count_and_all = $this->getCountAndAlll([$gr_id]);
+        $count_and_all = [];
+        if (is_array($gr_id)) {
+            $count_and_all = $this->getCountAndAlll($gr_id);
+        } else {
+            $count_and_all = $this->getCountAndAlll([$gr_id]);
+        }
         $result = [
         $result = [
             'course_list' => $course_list,
             'course_list' => $course_list,
             'count' => $count_and_all[0]['count'],
             'count' => $count_and_all[0]['count'],