editor_load() typehint is wrong: $format_id is integer, not string

Created on 15 December 2023, 11 months ago
Updated 12 March 2024, 8 months ago

Problem/Motivation

PHPstan is giving a warning when using the editor_load function.
Parameter #1 $format_id of function editor_load expects int, string given.

When creating a text-format the machine name can be anything, not just an int.

Steps to reproduce

Run phpstan when using the function editor_load()

Proposed resolution

Change the expected argument to int|string

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Editorย  โ†’

Last updated about 6 hours ago

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands robertragas

Live updates comments and jobs are added and updated live.
  • Documentation

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024