|
@@ -54,7 +54,7 @@ class CheckPower
|
|
|
if(!$parent) return 0;
|
|
|
}
|
|
|
|
|
|
- if($parent->type == 1)
|
|
|
+ if(isset($parent) && $parent->type == 1)
|
|
|
{
|
|
|
$cate = VideoCate::where('id','in',[$parent->first_classify,$parent->second_classify])
|
|
|
->where('status',1)->where('is_deleted',0)->count();
|
|
@@ -74,7 +74,7 @@ class CheckPower
|
|
|
if (!$parent) return 0;
|
|
|
}
|
|
|
|
|
|
- if($parent->type == 1)
|
|
|
+ if(isset($parent) && $parent->type == 1)
|
|
|
{
|
|
|
$cate = ArticleCate::where('id','in',[$parent->first_classify,$parent->second_classify])
|
|
|
->where('status',1)->where('is_deleted',0)->count();
|
|
@@ -93,7 +93,7 @@ class CheckPower
|
|
|
$parent = DatumIntro::where('id', $first_id)->where('status', 1)->where('is_deleted', 0)->find();
|
|
|
if (!$parent) return 0;
|
|
|
}
|
|
|
- if(!$parent->datum_cate) return 1;
|
|
|
+ if(isset($parent) && !$parent->datum_cate) return 1;
|
|
|
$cate = DatumCate::where('id','in',[$parent->datum_cate])
|
|
|
->where('status',1)->where('is_deleted',0)->count();
|
|
|
//if($cate != 1) return 0;
|