Issue Bug Closed

#107651Command cleanup:localprocessedfiles throws exception in scheduler backend

Julian Mair 10/10/25, 08:25 updated 02/06/26, 08:00

Description

While I executed the cleanup:localprocessedfiles command from the backend scheduler module (manually) i got this Exception:

TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(): Argument #1 ($path) must be of type string, false given, called in 
  /var/www/vhosts/brandnamic.com/app/vendor/typo3/cms-lowlevel/Classes/Command/CleanUpLocalProcessedFilesCommand.php on line 158

So i looked, and saw in CleanUpLocalProcessedFilesCommand and CleanUpLocalProcessedFilesService this call: PathUtility::stripPathSitePrefix($file->getRealPath());. The $file->getRealPath() could potentially be false, so IMHO a cast to string would make sense here.

Note: just checked on a second run of the command, the error doesn’t occur anymore. idk why … but better to prevent the error in the first place.

*System:*
PHP 8.4
TYPO3 13.4.18

EDIT: i just found out, that the code was changed in Typo3 v14 from $file->getRealPath() to $file->getPathname(). So it’s only a problem in v13.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 4

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-11-11T12:25:27+00:00" > 11/11/25, 12:25 </span>

    We changed a bit of this also in the recent 13.4 release. Can you check if this solves your issue too?

  2. Georg Ringer commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-02-06T08:00:31+00:00" > 02/06/26, 08:00 </span>

    closing issue because lack of feedback. feel free to contact me on slack to reopen if still valid