Commit 947ca4b0 authored by Chris Müller's avatar Chris Müller Committed by Anja Leichsenring
Browse files

[BUGFIX] Fix various PHP 8 warnings

Resolves: #95184
Releases: master
Change-Id: I28f194f06890085a9d9297356d83e4027ab80113
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71025

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 9a7f6741
......@@ -8859,7 +8859,7 @@ class DataHandler implements LoggerAwareInterface
while ($row = $result->fetchAssociative()) {
$log_data = unserialize($row['log_data']);
$msg = $row['error'] . ': ' . sprintf($row['details'], $log_data[0], $log_data[1], $log_data[2], $log_data[3], $log_data[4]);
$msg = $row['error'] . ': ' . sprintf($row['details'], $log_data[0] ?? '', $log_data[1] ?? '', $log_data[2] ?? '', $log_data[3] ?? '', $log_data[4] ?? '');
/** @var FlashMessage $flashMessage */
$flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $msg, '', $row['error'] === SystemLogErrorClassification::WARNING ? FlashMessage::WARNING : FlashMessage::ERROR, true);
/** @var FlashMessageService $flashMessageService */
......
......@@ -115,7 +115,7 @@ class CacheService implements SingletonInterface
*/
public function clearCacheForRecord(string $table, int $uid): void
{
if (!is_array($this->clearCacheForTables[$table])) {
if (!is_array($this->clearCacheForTables[$table] ?? null)) {
$this->clearCacheForTables[$table] = [];
}
$this->clearCacheForTables[$table][] = $uid;
......
Supports Markdown
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