Skip to content

Commit

Permalink
Use analysis_php_version_id instead of config->getPhpVersion()
Browse files Browse the repository at this point in the history
  • Loading branch information
pereorga committed Mar 8, 2023
1 parent 17939ed commit 187c214
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -47,8 +47,7 @@ public static function addTaints(AddRemoveTaintsEvent $event): array
$second_arg = $item->getArgs()[1]->value ?? null;

if ($second_arg === null) {
$php_version = $statements_analyzer->getCodebase()->config->getPhpVersion();
if ($php_version !== null && version_compare($php_version, '8.1', '>=')) {
if ($statements_analyzer->getCodebase()->analysis_php_version_id >= 8_01_00) {
return ['html', 'has_quotes'];
}
return ['html'];
Expand Down Expand Up @@ -100,8 +99,7 @@ public static function removeTaints(AddRemoveTaintsEvent $event): array
$second_arg = $item->getArgs()[1]->value ?? null;

if ($second_arg === null) {
$php_version = $statements_analyzer->getCodebase()->config->getPhpVersion();
if ($php_version !== null && version_compare($php_version, '8.1', '>=')) {
if ($statements_analyzer->getCodebase()->analysis_php_version_id >= 8_01_00) {
return ['html', 'has_quotes'];
}
return ['html'];
Expand Down

0 comments on commit 187c214

Please sign in to comment.