diff --git a/typo3/sysext/lowlevel/Classes/Command/CleanUpLocalProcessedFilesCommand.php b/typo3/sysext/lowlevel/Classes/Command/CleanUpLocalProcessedFilesCommand.php index 93fb20e20957..b83c0b5443c2 100644 --- a/typo3/sysext/lowlevel/Classes/Command/CleanUpLocalProcessedFilesCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/CleanUpLocalProcessedFilesCommand.php @@ -138,7 +138,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int protected function deleteFile(InputInterface $input, OutputInterface $output, array $files): array { - if (!$output->isVerbose()) { + $isVerbose = $output->isVerbose(); + if (!$isVerbose) { $io = new SymfonyStyle($input, $output); $progressBar = $io->createProgressBar(count($files)); } @@ -149,10 +150,10 @@ protected function deleteFile(InputInterface $input, OutputInterface $output, ar $path = PathUtility::stripPathSitePrefix($file->getRealPath()); if (unlink($file->getRealPath()) === false) { $error[] = $file; - $output->isVerbose() ? $output->writeln('[FILE] Failed to delete ' . $path) : $progressBar->advance(); + $isVerbose ? $output->writeln('[FILE] Failed to delete ' . $path) : $progressBar->advance(); } else { $success[] = $file; - $output->isVerbose() ? $output->writeln('[FILE] Successfully deleted ' . $path) : $progressBar->advance(); + $isVerbose ? $output->writeln('[FILE] Successfully deleted ' . $path) : $progressBar->advance(); } }