- Issue created by @robertragas
- Status changed to Needs review
11 months ago 8:00am 18 December 2023 - ๐ฎ๐ณIndia sidharth_soman Bangalore
I have modified the argument's comment. Apply against 10.0.x branch.
- last update
11 months ago 30,766 pass - Status changed to Needs work
11 months ago 2:54pm 18 December 2023 - ๐บ๐ธUnited States smustgrave
We should see what's calling it with a string and determine if that's incorrect.
Also would have to look at when that typehint was added if there was discussion about int vs string, which should be documented.
- Status changed to RTBC
9 months ago 8:53am 8 March 2024 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Actually, this seems like a very obvious, trivial mistake. Text formats had numerical IDs in Drupal 7. They don't in Drupal >=8.
No further research necessary IMO.
- Status changed to Needs work
9 months ago 9:05am 8 March 2024 The Needs Review Queue Bot โ tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request โ . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- ๐ฎ๐ณIndia keshav patel
Keshav Patel โ made their first commit to this issueโs fork.
- Merge request !6985Issue #3409040: editor_load() typehint is wrong: $format_id is integer, not string โ (Open) created by keshav patel
- Status changed to Needs review
9 months ago 6:26pm 9 March 2024 - ๐ฎ๐ณIndia keshav patel
Patch Rerolled and all checks passed. please review.
- Status changed to RTBC
9 months ago 10:23pm 10 March 2024 - ๐ฌ๐งUnited Kingdom longwave UK
Is it ever really int any more? Can we set it to string only?
- Status changed to Needs review
9 months ago 11:15pm 10 March 2024 - Status changed to RTBC
9 months ago 12:45am 11 March 2024 - ๐บ๐ธUnited States smustgrave
So looking into editor_filter_xss() there's a line
$editor = $format ? editor_load($format->id()) : NULL;
and id() can actually return string|int|null so guess int can still be passed.
- Status changed to Needs work
8 months ago 10:44am 12 March 2024 - ๐ฌ๐งUnited Kingdom catch
That looks like a bug in editor_filter_xss(), it should check isNew() before trying to load. Or if not, it should specify string|int|null. But I think we should just type hint on string here.