diff --git a/process/Task3.php b/process/Task3.php index b88444c..0cddb61 100644 --- a/process/Task3.php +++ b/process/Task3.php @@ -28,7 +28,7 @@ class Task3 $user_id = $value->user_id; //判定有没有父级 这里父级没有默认是0 $user = User::find($user_id); - if ($user->f_id==0) { + if (!empty($user)&&$user->f_id==0) { continue; } //获取该用户的父级