Skip to content

Commit ee2968d

Browse files
Try
1 parent 8970ab6 commit ee2968d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Type/Php/HashFunctionsReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
120120
$algorithmType = $scope->getType($functionCall->getArgs()[0]->value);
121121
$constantAlgorithmTypes = $algorithmType->getConstantStrings();
122122
if (count($constantAlgorithmTypes) === 0) {
123-
if ($functionData['possiblyFalse']) {
123+
if ($functionData['possiblyFalse'] || !$this->phpVersion->throwsValueErrorForInternalFunctions()) {
124124
return TypeUtils::toBenevolentUnion(TypeCombinator::union($stringReturnType, new ConstantBooleanType(false)));
125125
}
126126

0 commit comments

Comments
 (0)