fix: [eaccount] 부분 월 조회 시 무한루프 크래시 수정
- splitDateRangeMonthly()에서 endDate가 월 중간인 경우 cursor가 같은 달 1일로 되돌아가 무한루프 발생 - cursor 이동 로직 수정: chunkEnd+1일→월초 대신 chunkStart+1월→월초 - 부분 월, 전체 월, 다중 월 모든 케이스 테스트 완료
This commit is contained in:
@@ -748,8 +748,8 @@ private function splitDateRangeMonthly(string $startDate, string $endDate): arra
|
||||
'end' => $chunkEnd->format('Ymd'),
|
||||
];
|
||||
|
||||
// 다음 월 1일로 이동
|
||||
$cursor = $chunkEnd->copy()->addDay()->startOfMonth();
|
||||
// 다음 월 1일로 이동 (부분 월에서도 정상 작동)
|
||||
$cursor = $chunkStart->copy()->addMonth()->startOfMonth();
|
||||
}
|
||||
|
||||
return $chunks;
|
||||
|
||||
Reference in New Issue
Block a user