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 #1

Updated by Michael Voehringer over 1 year ago

  • Related to Bug #97666: Extbase ActionController::throwStatus incompatible signature added
Actions #2

Updated by Michael Voehringer over 1 year ago

A possible workaround it to add an empty string to htmlResponse

return $this->htmlResponse('');
Actions #3

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75854

Actions #4

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75854

Actions #5

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75854

Actions #6

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75857

Actions #7

Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75854

Actions #8

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75872

Actions #9

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75878

Actions #10

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75878

Actions #11

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/76197

Actions #12

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75878

Actions #13

Updated by Michael Voehringer over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF