Skip to content

Commit 1eaf111

Browse files
committed
PHP 8.1 fix warning about undefined array key "cacheCmd"
1 parent 2609a44 commit 1eaf111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/Service/SerializerService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static function getMetadataCache(): FileCache
9090
*/
9191
public static function clearCache(array $params): void
9292
{
93-
if (in_array($params['cacheCmd'], ['all', 'system'])) {
93+
if (isset($params['cacheCmd']) && in_array($params['cacheCmd'], ['all', 'system'])) {
9494
$filesystemService = GeneralUtility::makeInstance(FilesystemService::class);
9595
$filesystemService->flushDirectory(self::getSerializerCacheDirectory(), true, true);
9696
$filesystemService->flushDirectory(self::getAutogeneratedMetadataDirectory(), true, true);

0 commit comments

Comments
 (0)