Skip to content

Commit b8b526e

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: [Finder] Fix using `==` as default operator in `DateComparator`
2 parents 2cb8966 + 1d0e826 commit b8b526e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: Comparator/DateComparator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(string $test)
3636
throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
3737
}
3838

39-
$operator = $matches[1] ?? '==';
39+
$operator = $matches[1] ?: '==';
4040
if ('since' === $operator || 'after' === $operator) {
4141
$operator = '>';
4242
}

Diff for: Tests/Comparator/DateComparatorTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public static function getTestData()
5959
['after 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]],
6060
['since 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]],
6161
['!= 2005-10-10', [strtotime('2005-10-11')], [strtotime('2005-10-10')]],
62+
['2005-10-10', [strtotime('2005-10-10')], [strtotime('2005-10-11')]],
6263
];
6364
}
6465
}

0 commit comments

Comments
 (0)