Fix Jalali year-0 crash on /tasks from invalid target_date.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-22 17:56:39 +03:30
co-authored by Cursor
parent dc276dfbb5
commit 6caee30d9b
7 changed files with 37 additions and 15 deletions
+4 -1
View File
@@ -107,7 +107,10 @@ class User extends Authenticatable
foreach ($data->attendances as $att) {
if ($att->entered_at) {
$date = \Morilog\Jalali\Jalalian::fromCarbon(\Carbon\Carbon::parse($att->entered_at));
$date = \App\Support\JalaliHelper::fromDateTime($att->entered_at);
if (!$date) {
continue;
}
$month = $date->format('%B');
if (!isset($result[$month])) {