Skip to content

Commit 51f52fc

Browse files
committed
fix(repo): 条件为空返回空
1 parent 6e4941d commit 51f52fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

laravel/app/Http/Repository/NewBusRepository.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ public function getLineStatus($lineID)
9999
*/
100100
public function getLine($line)
101101
{
102+
if (empty($line)) {
103+
return [];
104+
}
102105
// 从缓存库中搜索
103106
try {
104107
$list = BusLine::search($line)->get('name', 'cid', 'LineGuid', 'LineInfo', 'station', 'lineID')->toArray();

0 commit comments

Comments
 (0)