Skip to content

Commit 066d0f2

Browse files
committed
fix(repo): 修复下标不存在的 bug
1 parent d0c1435 commit 066d0f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

laravel/app/Http/Repository/MultithreadingRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ public function newRequest($url, $appkey)
443443

444444
$returnArray = [];
445445
foreach ($this->data as $k => $v) {
446+
if (!isset($this->dataSet['data'][$k])) {
447+
Article::insert(['title' => $this->api_excel_id, 'content' => $k]);
448+
return [];
449+
}
446450
$returnArray[$k]['param'] = $this->dataSet['data'][$k];
447451
$returnArray[$k]['result'] = $v;
448452
}

0 commit comments

Comments
 (0)