Skip to content

Typed parameter with = null without explicitly marking it as nullable breaks backend #290

@helmutstrasser

Description

@helmutstrasser

The method FelixNagel\T3extblog\Controller\AbstractController::xmlResponse() declares a typed parameter with = null without explicitly marking it as nullable, which is deprecated since PHP 8.4. This results in a deprecation warning in the json string of the ajax request in the backend, which breaks it.

Change line 281 from
protected function xmlResponse(string $xml = null): ResponseInterface
to
protected function xmlResponse(?string $xml = null): ResponseInterface
to fix the deprecation warning.

This is already fixed for TYPO3 v14, so this is a backport for v13, which should also work with PHP 8.4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions