Projekt

Allgemein

Profil

Aktionen

Bug #131

offen

[Bugsink] ErrorException: Warning: Undefined array key "month"

Von Bug Sink vor etwa 2 Monaten hinzugefügt.

Status:
Neu
Priorität:
wichtig
Zugewiesen an:
-
Beginn:
01.09.2026
Abgabedatum:
% erledigt:

0%

Geschätzter Aufwand:

Beschreibung

Bugsink: https://bugsink.cytrus.de/issues/issue/38a0ab04-89cd-4c23-b508-e03e686c2b4c/event/last/

Typ: NEW issue

Projekt: www-verl-de

Bugsink Alert

ErrorException: Warning: Undefined array key "month"


Automatisch erstellt durch n8n

KI-Analyse:

1. Root Cause Identified

The PHP 8+ Warning: Undefined array key "month" (promoted to ErrorException by TYPO3) occurs because somewhere in the request pipeline code attempts to access the array key month without verifying its existence. The stack trace points to /public/index.php:17-21 and AbstractApplication::run (line 110), which is TYPO3's frontend entry point and request parameter processor.
Likely scenario: A custom or core extension/frontend plugin expects a ?month= GET parameter (e.g., for calendar archives, month-based navigation, or filtering) but the incoming request simply doesn't contain that parameter. Accessing $_GET['month'], $params['month'], or similar without isset(), array_key_exists(), or the null-coalescing operator (??) triggers the warning in PHP 8, and TYPO3's error handler converts it into the observed ErrorException.

2. Concrete Fix

  • Safe array access: Replace direct key access with the null-coalescing operator:
    $month = $params['month'] ?? null;
    or the TYPO3 helper:
    $month = GeneralUtility::_GP('month'); (returns null safely, no warning).
  • Conditional processing: Wrap any logic that depends on month in an existence check:
    if (array_key_exists('month', $params)) { /* process */ }
  • Debug/locate: Enable TYPO3_MODE dev visibility or check /public/index.php:17-21 for the exact line. Look for patterns like $\_GET['month'], $this->month, or $request->getQueryParams()['month'].
  • Template (Fluid) side: If the key is set in backend or TSconfig but used in Fluid, ensure the variable is passed or use {month -> f:format.date(...) | default:0}.

3. Affected TYPO3 Extension

The error originates from TYPO3 Core's HTTP framework (AbstractApplication, MiddlewareDispatcher, AbstractApplication::run), but the actual trigger is in the extension/code using the /public/index.php entry point (lines 17-21).

  • Most commonly: Extensions that provide month-based filtering/archiving, e.g., powermail, calendar, news, or any custom extension that reads a month GET parameter for pagination/archiving.
  • If you have a custom extension routing through that index.php, check its bootstrapping code for unprotected month parameter access.

4. Confidence

85% – The warning is unambiguous and the stack trace consistently points to request-parameter handling in TYPO3's core. The only variable is the exact line in your extension that accesses ['month'], which isn't visible in the provided trace, but the cause and fix pattern are standard and well-defined for PHP 8 + TYPO3 11/12/13.

Nichts anzuzeigen

Aktionen

Auch abrufbar als: Atom PDF