Skip to content

Commit 925ba2c

Browse files
Fix
1 parent d96f9e7 commit 925ba2c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

e2e/bug-10483/bug-10483.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
define("FILTER_VALIDATE_FLOAT",false);
44

5+
/** @return mixed */
6+
function doFoo() { return null; }
7+
58
$mixed = doFoo();
69
if (filter_var($mixed, FILTER_VALIDATE_BOOLEAN)) {
710
}

src/Type/Php/FilterFunctionReturnTypeHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function getType(Type $inputType, ?Type $filterType, ?Type $flagsType): T
105105

106106
if ($filterType === null) {
107107
$filterValue = $this->getConstant('FILTER_DEFAULT');
108-
if (null === $filterValue) {
108+
if ($filterValue === null) {
109109
return $mixedType;
110110
}
111111
} else {
@@ -442,7 +442,7 @@ private function getOptions(Type $flagsType, int $filterValue): array
442442
private function hasFlag(string $flagName, ?Type $flagsType): bool
443443
{
444444
$flag = $this->getConstant($flagName);
445-
if (null === $flag) {
445+
if ($flag === null) {
446446
return false;
447447
}
448448

0 commit comments

Comments
 (0)