Commit bcb50908 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[BUGFIX] Correctly resolve arrays in log messages

When using an array as data for a log entry placeholder,
it must be imploded as otherwise the placeholder would
not be resolved by AbstractWriter->interpolate().

Additionally, the exception is now correctly added to the
log message string in PhpErrorLogWriter again.

Resolves: #94594
Related: #94315
Releases: master
Change-Id: I0aa79e511fd164a75e974547057477479234c25b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69978

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 7970143b
......@@ -726,7 +726,7 @@ abstract class AbstractUserAuthentication implements LoggerAwareInterface
if (!empty($serviceChain)) {
$this->logger->debug('{subtype} auth services called: {chain}', [
'subtype' => $subType,
'chain' => $serviceChain,
'chain' => implode(',', $serviceChain),
]);
}
}
......
......@@ -48,7 +48,7 @@ class PhpErrorLogWriter extends AbstractWriter
strtoupper($record->getLevel()),
$record->getRequestId(),
$record->getComponent(),
$this->interpolate($record->getMessage(), $context),
$this->interpolate($message, $context),
$data
);
if (false === error_log($message)) {
......
......@@ -345,7 +345,7 @@ class FrontendUserAuthentication extends AbstractUserAuthentication
$this->updateOnlineTimestamp();
}
$this->logger->debug('Valid frontend usergroups: {groups}', ['groups' => $userGroups]);
$this->logger->debug('Valid frontend usergroups: {groups}', ['groups' => implode(',', $userGroups)]);
return GeneralUtility::makeInstance(UserAspect::class, $this, $userGroups);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment