From 9bbce806332448f939b3a5eb4d9156cbfe303a08 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 19 Sep 2022 18:22:16 +0800 Subject: [PATCH] 1 --- webapp/models/FragmentPool.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webapp/models/FragmentPool.php b/webapp/models/FragmentPool.php index 4dcb9464..e499c24a 100644 --- a/webapp/models/FragmentPool.php +++ b/webapp/models/FragmentPool.php @@ -29,7 +29,15 @@ class FragmentPool extends BaseModel { 'alloc_time' => $allocTime, ) ); - return $rows ? $rows : array(); + $items = array(); + if ($rows) { + foreach ($rows as $row) { + if ($row['fragment_num'] > 0) { + array_push($items, $row); + } + } + } + return $items; } }