Project

General

Profile

Actions

Bug #98417

closed

Extbase with empty htmlResponse incompatible signature

Added by Michael Voehringer over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2022-09-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Whenever an action did not need to return content of the content ist empty, PHP 8.1 reports a type miss match.

<?php

use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;

class ExampleController extends ActionController
{ 
   public function exampleAction(): ResponseInterface
    { 
        return $this->htmlResponse();
    }
}

(1/1) TypeError
TYPO3\CMS\Core\Http\StreamFactory::createStream(): Argument #1 ($content) must be of type string, null given, called in /var/www/html/private/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php on line 1092

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #97666: Extbase ActionController::throwStatus incompatible signatureClosed2022-05-21

Actions
Actions

Also available in: Atom PDF