mirror of https://github.com/1099438829/apeblog
修正因为数据为空导致的问题
This commit is contained in:
parent
16a0d26550
commit
481d0e2fcb
|
|
@ -604,7 +604,7 @@ function tpl_get_advert($type, int $row = 5)
|
|||
if (!$row){
|
||||
$row = 5;
|
||||
}
|
||||
return array_slice($advertList,0,$row);
|
||||
return !empty($advertList)?array_slice($advertList,0,$row):$advertList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue