Skip to content

Commit

Permalink
TASK: Casting severity to int (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbelasichon authored Jun 14, 2023
1 parent cc72ff0 commit 0ef6593
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function refactor(Node $node): ?Node
$severity = $this->nodeFactory->createClassConstFetch('TYPO3\CMS\Core\Log\LogLevel', 'INFO');

if (isset($node->args[2]) && $severityValue = $this->valueResolver->getValue($node->args[2]->value)) {
$severity = $this->oldSeverityToLogLevelMapper->mapSeverityToLogLevel($severityValue);
$severity = $this->oldSeverityToLogLevelMapper->mapSeverityToLogLevel((int) $severityValue);
}

$args[] = $severity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GeneralUtility::sysLog('message', 'foo');
GeneralUtility::sysLog('message', 'foo', 0);
GeneralUtility::sysLog('message', 'foo', 1);
GeneralUtility::sysLog('message', 'foo', 2);
GeneralUtility::sysLog('message', 'foo', 3);
GeneralUtility::sysLog('message', 'foo', '3');
GeneralUtility::sysLog('message', 'foo', 4);

?>
Expand Down

0 comments on commit 0ef6593

Please sign in to comment.