Review 12.4 Merged

89488[BUGFIX] "No such file or directory" in SimpleFileBackend::remove()

Christian Kuhn CR +2 V +2 Easy +1 −4 updated 05/20/25, 15:25

Commit message

Fix the time-of-check time-of-use issue in SimpleFileBackend::remove()
that caused "No such file or directory" PHP warnings on some concurrent
calls. It was introduced in 169eb06e3a5 ("[BUGFIX] Resolve PHP 8 issues
in acceptance tests"). Earlier change f5be82d05a1 ("[BUGFIX] Suppress
warning in SimpleFileBackend unlink()") contains an explanation in its
change message on why `\file_exists()` mustn't be used.

Since ErrorHandler::handleError() considers `\error_reporting()` when
filtering errors and adding `@` (the error suppression operator) to the
expression causes `\error_reporting()` to never set the E_WARNING bit,
ErrorHandler::handleError() will never throw an exception for a PHP
warning during `@\unlink()`.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Christian Kuhn uploaded patch set 1 05/20/25, 15:08

  2. core-ci voted on patch set 1 V +1 05/20/25, 15:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79248

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 05/20/25, 15:25

  4. Christian Kuhn merged patch set 2 05/20/25, 15:25