Review 13.4 Merged

91390[BUGFIX] Handle failed preg_replace() in indexed search

Garvin Hicking CR +2 V +2 Easy +27 −0 updated 10/31/25, 11:56

Commit message

preg_replace() can return null when encountering PCRE
errors such as PREG_BAD_UTF8_ERROR. The following
mb_strcut() then triggers TypeErrors.

The patch sanitizes this case and adds regression tests.

Trade-off: When PCRE fails, the description will contain
un-normalized whitespace (multiple spaces/newlines preserved)
instead of being collapsed to single spaces. We accept this
for now.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 46

  1. Garvin Hicking commented on patch set 1 10/31/25, 11:43

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 10/31/25, 11:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88246

  3. Christian Kuhn commented on patch set 2 10/31/25, 11:50

    Cherry Picked from branch main. Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  4. Garvin Hicking voted on patch set 2 CR +2 V +2 10/31/25, 11:53

  5. Garvin Hicking merged patch set 3 10/31/25, 11:53

  6. core-ci voted on patch set 2 V +1 10/31/25, 11:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88247