diff --git a/src/Psalm/Internal/Provider/AddRemoveTaints/HtmlFunctionTainter.php b/src/Psalm/Internal/Provider/AddRemoveTaints/HtmlFunctionTainter.php index 19606c9aa40..c96a50f1d52 100644 --- a/src/Psalm/Internal/Provider/AddRemoveTaints/HtmlFunctionTainter.php +++ b/src/Psalm/Internal/Provider/AddRemoveTaints/HtmlFunctionTainter.php @@ -46,6 +46,9 @@ public static function addTaints(AddRemoveTaintsEvent $event): array $second_arg = $item->getArgs()[1]->value ?? null; if ($second_arg === null) { + if ($statements_analyzer->getCodebase()->analysis_php_version_id >= 8_01_00) { + return ['html', 'has_quotes']; + } return ['html']; } @@ -95,6 +98,9 @@ public static function removeTaints(AddRemoveTaintsEvent $event): array $second_arg = $item->getArgs()[1]->value ?? null; if ($second_arg === null) { + if ($statements_analyzer->getCodebase()->analysis_php_version_id >= 8_01_00) { + return ['html', 'has_quotes']; + } return ['html']; }