From d6bbd6d75d84cadbe9aca539523566ac7bc277d4 Mon Sep 17 00:00:00 2001 From: wahyu Date: Mon, 30 Oct 2023 18:22:40 +0700 Subject: [PATCH] update actual start --- 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 3375682..ea48586 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -187,7 +187,7 @@ class ActivityController extends Controller $actualStartValues = array_column(array_filter($dataFinal, function($item) { return isset($item['actual_start']); }), 'actual_start'); - $returnActualStartOrEnd = min($actualStartValues); + $returnActualStartOrEnd = count($actualStartValues) > 0 ? min($actualStartValues) : null; if (isset($parent)) { $parent->actual_start = $returnActualStartOrEnd; $parent->save();