From f6a05748573fd37780a36bb9c56290113889b5cd Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Thu, 8 Jun 2023 08:52:45 +0700 Subject: [PATCH] Fix link creation --- app/Http/Controllers/ActivityController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index 8635b25..23ef012 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -488,7 +488,7 @@ class ActivityController extends Controller if (!empty($activity_row['predecessor'])) { $key = array_search($activity_row['predecessor'], array_column($data['activities'], 'no')); - if (!$predecessorActivity = Activity::find($data['activities'][$key]['activity_id'])) + if (!isset($data['activities'][$key]['activity_id']) || !$predecessorActivity = Activity::find($data['activities'][$key]['activity_id'])) continue; $predecessorFinishDate = new \DateTime($predecessorActivity->end_date);