Review 13.4 Abandoned

93014[BUGFIX] Add missing error handling for Redis commands in RedisBackend

Rico Sonntag CR 0 V -1 Hard +258 −0 updated 02/26/26, 19:35

Commit message

Redis commands like sMembers(), keys() and sUnion() can return false
when they fail (e.g. due to permission errors like NOPERM). The
RedisBackend does not check for these failures, causing the false
return value to propagate into array operations (array_diff, foreach),
resulting in TypeErrors that obscure the actual Redis error.

For example, when a Redis user lacks the 'sunion' permission, the
error manifests as:
  array_diff(): Argument #1 ($array) must be of type array, false given

This patch adds error handling to all Redis command calls that can
return false: sMembers() in set(), remove(), findIdentifiersByTag(),
flushByTag(), collectGarbage(); keys() in flush(), collectGarbage();
and sUnion() in removeIdentifierEntriesAndRelations().

Each failure is now logged as a warning with the Redis error message
from getLastError(), and the method either returns early or continues
with a safe default (empty array).

Review

  • Code review CR 0
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 2

Review log 23

  1. Rico Sonntag uploaded patch set 1 02/26/26, 12:45

  2. core-ci voted on patch set 1 V -1 02/26/26, 13:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96912

  3. Garvin Hicking abandoned the change 02/26/26, 19:35

    This seems to be a wrong relation chain; duplicate