Skip to content

Commit

Permalink
Fix PHP 7.4 compatibility
Browse files Browse the repository at this point in the history
Fix #3034
  • Loading branch information
kylekatarnls committed Jun 3, 2024
1 parent 117671b commit afd4658
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Carbon/Traits/Comparison.php
Original file line number Diff line number Diff line change
Expand Up @@ -995,10 +995,7 @@ public function is(string $tester)
}

if (preg_match('/^(?:Jan|January|Feb|February|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|September|Oct|October|Nov|November|Dec|December)$/i', $tester)) {
return $this->isSameMonth(
$this->transmitFactory(static fn () => static::parse($tester)),
false,
);
return $this->isSameMonth(static::parse($tester), false);
}

if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) {
Expand Down

0 comments on commit afd4658

Please sign in to comment.