Fix Jalali year-0 crash on /tasks from invalid target_date.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-1
@@ -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])) {
|
||||
|
||||
Reference in New Issue
Block a user