A route with a default title of 0 does not work

Created on 27 February 2023, over 1 year ago
Updated 2 March 2023, about 1 year 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 2 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.69.0 2024