1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 01:37:23 +01:00

fix wrong check for Range validity

This commit is contained in:
orklah 2021-09-12 18:06:10 +02:00
parent c226285a4b
commit dd9edb7afc

View File

@ -144,7 +144,7 @@ class TIntRange extends TInt
$new_max_bound = self::getNewLowestBound($int_range1->max_bound, $int_range2->max_bound);
}
if ($new_min_bound > $new_max_bound) {
if ($new_min_bound !== null && $new_max_bound !== null && $new_min_bound > $new_max_bound) {
return null;
}