|
@@ -84,9 +84,12 @@ class ArticleController extends HomeBaseController
|
|
|
$this->assign('category_child', $category_child);
|
|
|
|
|
|
//导航
|
|
|
- $path = explode('-', $category_self['path']);
|
|
|
- array_shift($path);
|
|
|
- $path_list = $portalCategoryModel->where('id', 'in', $path)->select();
|
|
|
+ $path_list = [];
|
|
|
+ if (!empty($category_self)) {
|
|
|
+ $path = explode('-', $category_self['path']);
|
|
|
+ array_shift($path);
|
|
|
+ $path_list = $portalCategoryModel->where('id', 'in', $path)->select();
|
|
|
+ }
|
|
|
$this->assign('path_list', $path_list);
|
|
|
|
|
|
return $this->fetch("/" . $tplName);
|