A route with a default title of 0 does not work

Created on 27 February 2023, almost 2 years ago
Updated 2 March 2023, almost 2 years ago

Problem/Motivation

This code:

elseif ($title = $route->getDefault('_title')) {

in \Drupal\Core\Controller\TitleResolver::getTitle() means that if you define a route with a default title of '0' it will not work as expected.

Yes '0' is a terrible title but the code is wrong.

Steps to reproduce

Proposed resolution

Check for 0 as title

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

9.5

Component
RoutingΒ  β†’

Last updated 3 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024