mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Ensure time log is iterable
This commit is contained in:
parent
611f43911e
commit
772ede661d
@ -80,7 +80,7 @@ class UpdateCalculatedFields
|
|||||||
|
|
||||||
$project->tasks->each(function ($task) use (&$duration) {
|
$project->tasks->each(function ($task) use (&$duration) {
|
||||||
|
|
||||||
|
if(is_iterable($task->time_log)) {
|
||||||
foreach(json_decode($task->time_log) as $log) {
|
foreach(json_decode($task->time_log) as $log) {
|
||||||
|
|
||||||
$start_time = $log[0];
|
$start_time = $log[0];
|
||||||
@ -89,6 +89,7 @@ class UpdateCalculatedFields
|
|||||||
$duration += $end_time - $start_time;
|
$duration += $end_time - $start_time;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user