Project

General

Profile

Actions

Bug #102773

closed

Static route causes type error when using EXT: syntax

Added by Lina Wolf 11 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
-
Start date:
2024-01-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When I define a static route like this in TYPO3 v12.4.9, PHP 8.2:


routes:
  -
    route: robots.txt
    type: staticText
    source: 'EXT:my_sitepackage_mysite/Resources/Public/robots.txt'

I get a type error:

TYPO3\CMS\Core\Http\HtmlResponse::__construct(): Argument #1 ($content) must be of type string, null given, called in /var/www/html/vendor/typo3/cms-frontend/Classes/Middleware/StaticRouteResolver.php on line 60

I would expect the EXT syntax to work here. But even if the file is not found it should not cause a PHP type Error


Files

Actions

Also available in: Atom PDF