Skip to content

Commit 90c8e6c

Browse files
committed
fix(repo): 清除数组空元素
1 parent 9d61c72 commit 90c8e6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

laravel/app/Http/Repository/MultithreadingRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public function newRequest($url, $appkey)
385385
// this is delivered each successful response
386386
$result = $response->getBody()->getContents();
387387
// 记录返回数据到数据库 api_excel_logs 中
388-
$para = array_values($this->dataSet['data'][$index]);
388+
$para = array_filter(array_values($this->dataSet['data'][$index]));
389389
$logs = [
390390
'api_excel_id' => $this->api_excel_id,
391391
'sort_index' => $index,
@@ -399,7 +399,7 @@ public function newRequest($url, $appkey)
399399
$this->data[$index] = $result;
400400
},
401401
'rejected' => function($reason, $index) {
402-
$para = array_values($this->dataSet['data'][$index]);
402+
$para = array_filter(array_values($this->dataSet['data'][$index]));
403403
$logs = [
404404
'api_excel_id' => $this->api_excel_id,
405405
'sort_index' => $index,

0 commit comments

Comments
 (0)