An error occurred while fetching folder content.
Thomas Hohn
authored
`LogDataTrait::formatLogDetailsStatic()` simple used `vsprintf()` in case that the string contains any `%` characters and throws either a `\ValueError` or `\ArgumentCountError` depending if no value exists or the count does not match. It is not reliable and implement additional lexing here to avoid the exception by not calling `vsprintf()` upfront. This change calls `vsprintf()` and handles the mentioned exceptions and use the fallback handling in case exception has been thrown as a simplefied approach. Tests are added to cover legacy, mixed and new log format option along with static and instanced method calls. Note that a minor inline PHP DocBlock annotation has been added in `LogDataTrait` to mitigate detection issues of PHPStan, which allows now to remove baseline ignore patterns in the same run. Used command(s): > Build/Scripts/runTests.sh -s phpstanGenerateBaseline Resolves: #103711 Releases: main, 12.4 Change-Id: I7b23eccdc944d2cb068f584b01b52835aca938e9 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84004 Tested-by:core-ci <typo3@b13.com> Tested-by:
Garvin Hicking <gh@faktor-e.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Garvin Hicking <gh@faktor-e.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Name | Last commit | Last update |
---|