EntityBundleFieldInfoAlterEvent::__construct(): Argument #3 ($bundle) must be of type ?string, int given

Created on 13 March 2024, 3 months ago
Updated 28 March 2024, 3 months ago

Problem/Motivation

A type error occurs when a bundle has a number-only machine name. This is the same issue as 🐛 TypeError: core_event_dispatcher_entity_create_access(): Argument #3 ($entityBundle) must be of type ?string, int given when entity bundle machine namie is number Fixed , but in the 4.x version.

Steps to reproduce

Create a node type called '404'.

Proposed resolution

Cast to a string before assigning to the property.

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇧🇪Belgium DieterHolvoet Brussels

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024