Repository navigation
Fix fatal error when passing a float column width to rtrim() - #2725
westonruter wants to merge 4 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
🤖 Comment by Claude Opus 5.5 Origin of the bugThere are two parts: Gutenberg changed the attribute's type, and the plugin later made that change fatal. 1. Gutenberg changed the Column
Block deprecations only run in the editor. Server-side render filters receive the raw stored attributes, so 2. On the plugin side, the The string cast in this PR addresses the cause and not just the symptom. The legacy numeric format always meant a percentage from 0 to 100, so Other faulty assumptions in
|
Block context is not type-coerced, and a third-party block can provide `postId` from a raw attribute via `providesContext`. With strict types, a numeric string there would cause a TypeError when passed to `auto_sizes_get_featured_image_attachment_id()`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Block attributes are not type-coerced on the server, so `align` is passed through exactly as stored in the block comment delimiter. With strict types, a non-string value would cause a TypeError when passed to the `string $align` parameter of `auto_sizes_calculate_better_sizes()`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2725 +/- ##
=======================================
Coverage 70.50% 70.50%
=======================================
Files 91 91
Lines 7869 7869
=======================================
Hits 5548 5548
Misses 2321 2321
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The raw `align` attribute of a container block is copied into the `max_alignment` context, which is later passed to the `string $max_alignment` parameter of `auto_sizes_calculate_better_sizes()`. Block attributes are not type-coerced on the server, so with strict types a non-string value would cause a TypeError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Fixes #2724
Use of AI Tools
None initially, but then review and additional commits provided by Claude Opus 5.5.