Skip to content

Commit ed118eb

Browse files
Merge pull request #30 from drsdre/drsdre-patch-getAllPeriods-float-cast
Fix Carbon\Carbon::rawAddUnit() string error
2 parents 73fad31 + 37e2d89 commit ed118eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Collections/ProjectionCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private function getAllPeriods(Carbon $startDate, Carbon $endDate, string $perio
196196
[$periodQuantity, $periodType] = Str::of($period)->split('/[\s]+/');
197197

198198
while ($cursorDate->notEqualTo($endDate)):
199-
$cursorDate->add($periodQuantity, $periodType);
199+
$cursorDate->add((float)$periodQuantity, $periodType);
200200

201201
if ($cursorDate->notEqualTo($endDate)) {
202202
$allProjectionsDates->push(clone $cursorDate);

0 commit comments

Comments
 (0)