Skip to content

Commit

Permalink
Merge pull request #9471 from pereorga/feature/ent-quotes-default-php81
Browse files Browse the repository at this point in the history
Consider new HTML entity en/decode function defaults since PHP 8.1
  • Loading branch information
orklah authored Mar 8, 2023
2 parents 222887a + f70b375 commit 3008d55
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}

Expand Down Expand Up @@ -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'];
}

Expand Down

0 comments on commit 3008d55

Please sign in to comment.