Repository navigation
fix: incorrect conditional check in WP_Theme_JSON_Gutenberg::convert_variables_to_values() - #68401
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
…variables_to_values()
e0d6d11 to
4ff09a5
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This makes `WP_Theme_JSON_Gutenberg::convert_variables_to_value()` identical to `WP_Theme_JSON::convert_variables_to_value()` in WordPress core, which made the same fix with `str_contains()` in r63895. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the |
|
🤖 Comment by Claude Opus 5.5 Trunk was merged in, and the check was changed from There is no change in output: the |
What?
This PR fixes an issue in
WP_Theme_JSON_Gutenberg::convert_variables_to_values(), wherepreg_match_all()is aways run, even ifvar(is not found in the style.This is due to the loose
0 <= falsecomparison.Why?
While this issue was surfaced by PHPStan (via #66693) it can be remediated independently as part of #66598
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast